Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make the player face a certain direction after touching an object?

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

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.