I have a script in a drive seat, that makes the player’s JumpPower go to 0 because the car needs the spacebar for the handbrake.
But when I enter the car again, it doesn’t change the JumpPower but it does print like if it did work.
This is the script
script.Parent.Changed:Connect(function()
if script.Parent.Occupant ~= nil then
script.Parent.Occupant.JumpPower = 0
print("Test")
end
end)
I tried changing the 3rd line many times and same results. I also tried disabling some other scripts (f to leave) but still the same
You can use the humanoid’s State to check if they are sitting down.
humanoid.StateChanged:Connect(function(old, new)
if new == Enum.HumanoidStateType.Sitting then
humanoid.JumpHeight = 0
else
humanoid.JumpHeight = --default jump height here
end
end)