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

Making a "skid" animation for the player?

Asked by 5 years ago

I'm looking for a way to have a script sense when a player changes their direction drastically while running, so that it can play a skidding animation. I started off with this local script, but it is not a good way to handle it at all.

1local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
2 
3while true do
4    local direction = humanoid.MoveDirection
5    wait(0.1)
6    if humanoid.MoveDirection == direction * -1 and humanoid:GetState() == Enum.HumanoidStateType.Running then
7        print("skid!")
8    end
9end

I'm not sure how else I could approach this. Any ideas?

0
I think you should create an animation and alter the walkspeed. Geobloxia 251 — 5y

Answer this question