I am trying to stop a vehicle sound from playing after player leave’s the Vehicle but i don’t know how to do it.
You could use get PropertyChangedSignal on the jump property of the player’s humanoid, also the sitting property.
Hm, I suppose you could use VehicleSeat.Occupant to find when the occupant is empty?
Just for reference, is this in a localscript or a script?
But if there’s a different player in the seat, the sound won’t stop?
Correct me if i’m wrong lol
dosent work …
local Seat = -- seat path here
local Sound = -- sound path here
Seat.Changed:Connect(function()
if script.Parent.Occupant == nil then
Sound:Stop()
end
end)
You should search stuff before you ask about it here, as this was posted with a solution already:
The link provided is for when a player sits instead of leaves.
Correct, although the link also contains relevant code, like the “.Changed” event which is used to check for an occupant. OP could look up the relevant thread and change out “Occupant ~= nil” with “Occupant == nil”, hence why I linked it.