I have this code below and I would like to know how to modify it to prevent a player from jumping. I have tried looking for a solution but could not find one. There are no errors in the output.
wait(1) local player = game.Players.LocalPlayer hum = Workspace[player.Name].Humanoid hum.Jumping:connect(function() hum.Jump = false end)
I had the same problem about a year ago. You have to set hum.Jump to false whenever the humanoid changes. You also don't need the local in front of player as you want it to be used throughout the script, not within a specific scope.
wait(1) player = game.Players.LocalPlayer hum = workspace[player.Name].Humanoid hum.Changed:connect(function() hum.Jump = false end)