So after this script plays the animation, I want it to go back playing Roblox's character default animations, but it stays as the animation listed below. How do I make this happen? Thanks!
local animation = Instance.new('Animation') animation.AnimationId = "http://www.roblox.com/Asset?ID=120735762" function onEquip() script.Parent.Handle.UnsheathSound:Play() end function onActivate() script.Parent.Handle.SlashSound:Play() local player = game.Players.LocalPlayer.Character local animTrack = player.Humanoid:LoadAnimation(animation) animTrack:Play() script.Parent.Handle.Script.Disabled = false end script.Parent.Equipped:connect(onEquip) script.Parent.Activated:connect(onActivate)
I assume the Animation has Loop set to true? You could reupload the animation with looping disabled. Another way is just doing animTrack:Stop() when you want. Maybe animTrack.Stopped:connect() can help, although I'm not sure if that fires for a looping animation.