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

Rotation following player?

So, last year, When I knew nothing about scripting, I joined this game that taught you how to script. It had this big eye. It would look at you. What I mean is that. If you move, the eye rotates to look at you. How did they do that?

1 comment

1

BodyGyros or mathematics. Have fun!

1 answer

Well, I suppose you're trying to find the CFrame that allows one thing to "look" at another. This is easy.

CFrame.new(vector1, vector2)

vector1 is the object's position, and the vector2 is the position that the object (or vector1) will look at.

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