local AbleToBeUsed = true
script.Parent.Activated:Connect(function()
if not AbleToBeUsed then return end
game.Players.LocalPlayer.Character.Humanoid:WaitForChild("Animator"):LoadAnimation(script.Animation):Play()
AbleToBeUsed = false
wait(5)
AbleToBeUsed = true
end)
When set to false, the tool is disabled and the player cannot use the tool. It prevents the tool from being activated or deactivated by the Tool/Activate and Tool:Deactivate functions. It also prevents theTool.Activated and Tool.Deactivatedevents from firing for the tool.