Hello ,
I'm asking for your help , I'm doing a tool , where there is a localscript , it's supposed to play an animation :
repeat wait()until game.Players.LocalPlayer.Character
local plr = game.Players.LocalPlayer
local char = plr.Character
debounce = false
script.Parent.Equipped:Connect(function()
script.Parent.Activated:Connect(function()
if debounce == false then
debounce = true
local anim = Instance.new("Animation", char)
anim.AnimationId = "rbxassetid://2192134468"
local playanim = char:FindFirstChild("Humanoid"):LoadAnimation(anim)
playanim:Play()
wait(1)
debounce = false
end
end)
end)
It's working , but the problem is that the animation always breaks , I really need this thing to work , I really need your help , I don't know what to do :(
Thanks .

3 comments
the parent parameter of Instance.new is decaperated
what do u mean by the animation breaking
like if my animation is we will say a punching animation , before punching the animation will maybe stop