tool = script.Parent
handle = tool:WaitForChild("Handle")
local Debounce = false
tool.Equipped:Connect(function()
print("The Tool Was Equipped")
tool.Handle.ParticleEmitter.LockedToPart = true
tool.Sound:Play()
end)
tool.Activated:Connect(function()
print("nice")
script.Parent.Parent.Humanoid:LoadAnimation(script.Animation):Play()
tool.Handle.ParticleEmitter.LockedToPart = false
tool.Handle.ParticleEmitter.EmissionDirection = ("Front")
tool.Handle.ParticleEmitter.Lifetime = NumberRange.new(3,3)
tool.Handle.ParticleEmitter.Acceleration = Vector3.new(0, 0.5, 0)
wait(2.5)
tool.Handle.ParticleEmitter.Lifetime = NumberRange.new(0.5,0.5)
tool.Handle.ParticleEmitter.Acceleration = Vector3.new(0, 0, 0)
script.Parent.Parent.Humanoid:LoadAnimation(script.Animation):Stop()
wait(2.5)
tool.Handle.ParticleEmitter.EmissionDirection = ("Top")
tool.Handle.ParticleEmitter.LockedToPart = true
end)
tool.Unequipped:Connect(function()
print("The Tool Was Unequipped")
tool.Sound:Stop()
script.Parent.Parent.Humanoid:LoadAnimation(script.Animation):Stop()
end)
tool.Deactivated:Connect(function()
print("The Tool Has Been Deactivated")
end)
please help me put a cooldown or debounce whatever on this script like When it's activated I need to wait another 6 seconds to be able to activate it again "This script is on a tool on starterpack, I use Left click to Activate"
