I am very very very new to coding and I have 2 scripts for a tool. One of said scripts is for adding speed, and the other is for an animation. How do I add a debounce so you cant spam autoclick?
Speed script
script.Parent.Equipped:Connect(function()
script.Parent.Activated:Connect(function()
local Hum = script.Parent.Parent:FindFirstChild("Humanoid")
Hum.WalkSpeed = Hum.WalkSpeed + 0.10
end)
end)
Animation Script
script.Parent.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
end)
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)

1 comment
Fixed my answer