I'm making a wall jumping script and I have it so when you jump onto an object, an animation plays, and you'll be on the wall. The issue is, the player doesn't automatically face the right direction. So the player's hand will be in the air instead of the wall because the player is facing the wrong way. Is there a way to make it so the player faces a certain direction so the animation is correct? Here is my code so far.
function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if human then human.Parent.Animate.Disabled = true game.Workspace.walljumppart.CanCollide = true local anim = human:LoadAnimation(script.Parent.Animation) anim:Play() human.WalkSpeed = 0 end end script.Parent.Touched:connect(onTouched)
Thanks
-Ben
Try using lookvector: https://scriptinghelpers.org/questions/14747/what-is-lookvector-and-how-do-i-use-it