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

How to use CFrameValue Objects?

How are CFrameValues used? I was wondering if someone could show me an example script using CFrameValues.

Also if I wanted to store a Value to then teleport players to would I use a CFrameValue or Vector3Value?

1 answer

✓ Accepted answer

You would simply set the value using a cframe.

CFrameValue.Value = CFrame.new(0,5,0) -- Sets the CFrame of the value to 0,5,0 position and default rotation.

If you wanted a value to teleport players, I would recommend using a CFrame, as you can set the rotation too. If you want the Vector3 position of the CFrame, simply index "p"

print(CFrameValue.Value.p) -- The output prints a Vector3 saying "0,5,0"

1 comment

0

Thanks!

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