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

What is CFrame? And what do I need to know first before I learn it?

1 answer

✓ Accepted answer

Cframe (abbreviated as Coordinate frame) is known as a data type used to move and rotate an item. It uses GLOBAL coordinates (X, Y, and Z) and rotation data for each axis. As a beginner scripter, I don't use it usually for most of my projects, but that's just me.

While using Cframe, there are several 'constructors' that are used for CFrame.

A simple one can be Cframe.new(). Example:

game.Workspace.Baseplate.CFrame = CFrame.new(1000,1000,1000)

Vector3 can also be used. For example, Vector3 can be used as showed:

game.Workspace.Baseplate.CFrame = CFrame.new(Vector3.new(1000,1000,1000)) 

Instead of using Cframe, you can use Vector3.new but I'm not forcing you to.

There are more constructors, but those are 2 that were listed.

If you'd like to know more constructors, click below: https://developer.roblox.com/en-us/api-reference/datatype/CFrame

It's directly from ROBLOX, so they should have maybe more information that I put here.

Hoped this helps! :D

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