I want players to not be able to jump but still be able to get out of chairs so here is the code I tried to but together but I'm not good at coding so I need help
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:connect(function(character)
while true do
wait(1)
if game.Players.LocalPlayer.Character.Humanoid.Sit == true then
character:WaitForChild("Humanoid").JumpPower = 1
character.Humanoid.Jump = true
print("sitting")
else
print("standing")
character:WaitForChild("Humanoid").JumpPower = 0
end
end
end)
end)
can anyone tell me what's wrong with this?

1 comment
Can you please tell me if this is a LocalScript or a ServerScript?