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

How would I make a player face towards something?

Would I use body gyro?

Basically I just want it so the player is facing towards a part. Idk where to start though

2 comments

0

head:Twist() LMAO jk

0

This isn't a request site

1 answer

You would have to use CFrame of the HumanoidRootPart

This is the construct we're going to use: https://gyazo.com/c916627e2886380c62cf6316b40a36dd

humanoidRootPart = player.Character:FindFirstChild("HumanoidRootPart") --Example
targetPart = workspace.Part --Example

humanoidRootPart.CFrame = CFrame.new(humanoidRootPart.Position, targetPart.Position)

Hope this helps!

Link to CFrame for reference:

http://wiki.roblox.com/index.php?title=CFrame

1 comment

1

there really isn't a reason to use global variables here, but ok

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