local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:FindFirstChild('Humanoid')
script.Parent.Activated:connect(function()
if humanoid then
humanoid.Health = humanoid.Health + 0 --
wait(2)
script.Parent:remove()
end
end)
COMMUNITY QUESTION
How would I make this script only activate after I use my tool 5 times?
1 answer
Use a check
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:FindFirstChild('Humanoid')
local Index = 0
local Max = 5
script.Parent.Activated:connect(function()
if humanoid and Index == Max then
humanoid.Health = humanoid.Health + 0 --
wait(2)
script.Parent:remove()
else
Index = Index + 1
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
this is what i thought
That's perfect. Thank you so much