Humanoid JumpPower in Tools?

I made a thing to make the player jump higher when they are holding the tool. but its not working?

local tool = script.Parent

tool.Activated:Connect(function()
	local humanoid = script.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		humanoid.JumpPower = 120
		tool.Unequipped:Connect(function()
			humanoid.JumpPower = 50
		end)
	end
end)
2 Likes

Instead of .Activated event, use .Equipped

local tool = script.Parent

tool.Equipped:Connect(function()
	local humanoid = script.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		humanoid.JumpPower = 120
		tool.Unequipped:Connect(function()
			humanoid.JumpPower = 50
		end)
	end
end)
1 Like

Use tool.Equipped instead of tool.Activated