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

How to use CFrameValue Objects?

Asked by 6 years ago

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

Log in to vote
0
Answered by
UgOsMiLy 1074 Moderation Voter
6 years ago

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"
0
Thanks! Optimalpokemon123 37 — 6y
Ad

Answer this question