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)

2 comments
It is a good idea to use local variable whenever possible, even when they're on the global scope anyways. They make your code more readable and more efficient.
They are not required and they don't always make it more readable or more efficient. It is a matter of personal opinion, not making me wrong, ergo making the downvote unnecessary.