This code is supposed to set player jumpPower to 500 when i click the part, but it doesn't work and im not sure why
script.Parent.ClickDetector.MouseClick:connect(function(player)
player.Character.Humanoid.jumpPower = 500
end)
This code is supposed to set player jumpPower to 500 when i click the part, but it doesn't work and im not sure why
script.Parent.ClickDetector.MouseClick:connect(function(player)
player.Character.Humanoid.jumpPower = 500
end)
The other answer isn't quite what you wanted and didn't explain.
The issue you had was that the property didn't have a capital J, and they are case sensitive.
Here's the fixed version for you:
script.Parent.ClickDetector.MouseClick:connect(function(player)
player.Character.Humanoid.JumpPower = 500
end)
Lua is case sensitive so "jumpPower" is not the same as "JumpPower". You should have also seen this error in the output example
This is a simple fix:-
script.Parent.ClickDetector.MouseClick:connect(function(player)
player.Character.Humanoid.JumpPower = 500
end)
Hope this helps.
game.Players.PlayerAdded:connect(function(plr)
script.Parent.ClickDetector.MouseClick:connect(function()
plr.Character.Humanoid.JumpPower = 500
end)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.