I’m making a boat, and I need to detect whether to allow the player to control the boat by checking if the player is in the vehicleseat. I’ve tried searching it up but i don’t understand any of the options.
Do you actually care who the player is?
You could cheat and just read the VehicleSeat’s Throttle
and Steer
values directly (or ThrottleFloat
/SteerFloat
):
local seat = -- ... some VehicleSeat
seat:GetPropertyChangedSignal("Throttle"):Connect(function()
print("Seat throttle changed to: " .. seat.Throttle)
end)
seat:GetPropertyChangedSignal("Steer"):Connect(function()
print("Seat steer changed to: " .. seat.Steer)
end)