I'm making a GUI where if you press a button it will set everyone in the games jump power to 0 but when I make this script it didn't work and I can find anywhere that shows how to do this. I've tried this in a local script and a script but neither of them work.
Heres the script.
script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(game.Players) do
i.Charcater.Humanoid.JumpPower = 0
end
end)
If fairly new to scripting so this may come as a simple fix but it would be really appreciated.

2 comments
Alright. I'll check this.
It worked! Thank you.