Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Does this local script work? I am confused with line 3 in this script.

--Local Script
tool = script.Parent
tool.Equipped:connect(function()
game.Players.LocalPlayer.JumpHeight = 100
end)

I am confused with line 3. Someone please show me the error and make a example that works..

Sorry about my bad English.

1 comment

0

I bet line 3 will make an error

1 answer

I think you mean line 4

Local Player gets the player. JumpHeight is not a property of the player. JumpPower is a property of the Humanoid inside the character. To get the character, use .Character on the player. After we get the character we can get the Humanoid. Example,

--Local Script
local tool = script.Parent

tool.Equipped:connect(function()
    game.Players.LocalPlayer.Character.Humanoid.JumpPower = 100
end)

Good Luck!

If I helped, please don't forget to accept my answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.