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

Tool that increases player jumppower. Help?

Alright, I'm trying to make a tool that increases player jumppower when they equip it, and returns their jumppower to normal once they unequip.

My script so far:

function i() local jump = script.Parent.Parent.Humanoid

jump.Jumppower =('') +5

end script.Parent.Equipped:connect(i) script.Parent.Unequipped:connect(pie)

1 comment

0

Whats the problem? explain your script, any error? don't just throw your goal and the script and expect someone to do anything

1 answer

✓ Accepted answer

Put a LocalScript inside the tool and put the following script

local Tool = script.Parent
local Character = nil

local function ToolEquip()
      Character = Tool.Parent
      Character.Humanoid.JumpPower = 75 -- Adjust the JumpPower as you wish
end

local function ToolUnequip()
       Character.Humanoid.JumpPower = 50 -- Adjust the JumpPower as you wish
       Character = nil -- Just in case someone decides to drop the weapon and another person decides to pick it up
end

Tool.Equipped:Connect(ToolEquip)
Tool.Unequipped:Connect(ToolUnequip)

1 comment

0

If you are doing it in a local script, just do game.Players.LocalPlayer.Character, having a player equip a tool before 2 seconds have passed after re spawning will stop the tool from working and throw an error.

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