Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make my walkspeed 0 after I play this animation?

Asked by 5 years ago

I want to make it so you can't move after you say "/e lay", which means my walkspeed would have to be 0 and the animation stops by saying "/e up" my walkspeed would go back to normal (which would be 16), but I don't know how to put that in the script.

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 animation: https://gyazo.com/d7f6d8ea7a7ba47d87c5c7599b48b153

Answer this question