-- NTG1D & Sallomy


local VehicleSeat = script.Parent
 
VehicleSeat.Changed:connect(function(prop)
    if prop == "Occupant" then
        local humanoid = VehicleSeat.Occupant
        if humanoid then
            local player = game:GetService("Players"):GetPlayerFromCharacter(humanoid.Parent)
            if player then
                VehicleSeat:SetNetworkOwner(player)
            end
        else
            VehicleSeat:SetNetworkOwner(nil)
        end
    end
end)
