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

How do i make a brick rotate to face a clicked position?

Asked by 7 years ago

How would i make a brick rotate to face a clicked position?

1 answer

Log in to vote
0
Answered by
Voltoxus 248 Moderation Voter
7 years ago
CFrame.new(Vector3 pos, Vector3 lookAt)

So the pos would be the position of origin or the current position of the part, and the lookAt would be to clicked position using, mouse.Hit.P assuming your using the mouse.

Doing CFrame.new() with two vector3 in the constructor makes the part point toward the second vector3.

0
Thank you so much. justintubba123 6 — 7y
Ad

Answer this question