I hope i uploaded the right video but uh as you can see its glitching? I dont know what could be causing this heres the script
local animations = {"133276857812612"} -- put ur animation ids here
local CanAttack = true
script.Parent.Activated:Connect(function()
if CanAttack == true then
local animation = Instance.new("Animation", script.Parent.Parent)
animation.AnimationId = "http://www.roblox.com/asset?id="..animations[math.random(1, #animations)]
local chosenanim = script.Parent.Parent.Humanoid:LoadAnimation(animation)
chosenanim:Play()
CanAttack = false
wait(chosenanim.Length)
CanAttack = true
end
end)
use formatting to make the pasted script neater and easier to understand (```)
like
this
Anyway, Is the problem that the animation doesnt stop playing? If so, make sure to reupload the animation but with the looping disabled. And if it behaves weirdly with other animations, make sure to change the priority to something higher or increase it’s weight.
(Assuming you own the animations)