What is a CFrame?
C is Not for Cookie. C is for Coordinate.
A CFrame is an invisible box around an object that controls the object’s location and orientation. You see it in light blue when you select an item.
What is a Vector3?
A Vector3 is simply 3 numbers grouped together. You will commonly see them as XYZ and in red,green, blue. They can store things like location or rotation and you can use them in a CFrame.
Creating a CFrame
Add a script. Don’t make anything it’s parent. You can do this by hitting the + next to Workspace and typing in Script. Type in the following code:
Play the game. If you land on a newly created part, you did it right!
Next, write this code:
You must replace your username with my username for it to work!
If you did it right, the part will hover and stare at you as you walk around. Cool? Creepy?
The CFrame is being told to keep its position “myPos” but look at you “myLook.”
KEEP THIS FILE FOR THE NEXT ACTIVITY!