I made a script in which your character types in chat "/e lay" they play a laydown animation which I've made and it works, but I realized after the player types that and the animation plays, they're stuck in that position until they reset. How do I fix the script so that after they type "/e lay" if they move while in that position, the lay down animation stops and they go back to normal?
Script:
game.Players.PlayerAdded:connect(function(Plr)
Plr.Chatted:connect(function(msg)
if msg == "/e lay" then -- You could replace the MSG with anything if you want
A = Instance.new("Animation", Plr.Character)
A.AnimationId = "http://www.roblox.com/Asset?ID=2674544973" -- Here replace the 00s with your Animation ID
animTrack = Plr.Character.Humanoid:LoadAnimation(A)
animTrack:Play()
end
end)
end)
========================================================================================================================================================
Video of what the animation looks like: https://gyazo.com/d7f6d8ea7a7ba47d87c5c7599b48b153

1 comment
Ohh, I feel stupid lol. Thank you.