I want to put a debounce to Button1Down and Button1Up so players won't be spamming clicks. Thank you! <3
script.Parent.Equipped:Connect(function(mouse)
local wield = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Wield)
wield:Play()
mouse.Button1Down:Connect(function()
local wield = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Wield)
local lunge = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Lunge)
local slash = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Slash)
wield:Stop()
lunge:Play()
end)
mouse.Button1Up:Connect(function()
local wield = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Wield)
local lunge = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Lunge)
local slash = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Slash)
slash:Play()
wait(1)
slash:Stop()
wield:Play()
end)
end)
