Making a "skid" animation for the player?
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.
1 | local humanoid = game.Players.LocalPlayer.Character:WaitForChild( "Humanoid" ) |
4 | local direction = humanoid.MoveDirection |
6 | if humanoid.MoveDirection = = direction * - 1 and humanoid:GetState() = = Enum.HumanoidStateType.Running then |
I'm not sure how else I could approach this. Any ideas?