So I have this script:
seat = script.Parent
function c(Player)
Player.Character.Humanoid.Sit = true
Player.Character.Torso.CFrame = CFrame.new(seat.Position + Vector3.new(0,seat.Size.X / 2.4,0))
Player.Character.Torso.CFrame = Player.Character.Torso.CFrame * CFrame.Angles(0,3.1416 / 2,0)
end -- End
seat.clickdetector.MouseClick:connect(c)
I really like it that you can click on it to sit rather than jump on it 4 times hoping you will sit but I want to have some sort of safeguard so that you can't keep clicking it while you are on the seat. I want to make it so that when you click it to sit down the Clickdetector range gets set to 0, but is restored once the player gets off.
I have thought about using ChildAdded or ChildRemoved to connect but it doesn't create a Seatweld. Is there something I am overlooking?
