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

MoveTo(Vector3)

Asked by
Vrakos 109
10 years ago

Could I make a model face a certain direction with :MoveTo()? Like :MoveTo(CFrame.new(Pos,Rotation))?

Or is there another method for model CFraming?

1 answer

Log in to vote
-2
Answered by
AxeOfMen 434 Moderation Voter
10 years ago

You can make a model face a given Vector3 position using code like this:

MyPart.CFrame = CFrame.new(MyPart.Position, Vector3.new(X,Y,Z))

For example, to make a player face a part called "SpawnFocus" you could do this:

player.Character.Torso.CFrame = CFrame.new(player.Character.Torso.Position, workspace.SpawnFocus.Position)

I hope this helps!

1
Yes, it was what I was asking for. Thank you. Vrakos 109 — 10y
Ad

Answer this question