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

What is the difference between "CFrameValue" and "StringValue"?

Asked by 9 years ago

I came across "CFrameValue" while tinkering with "Advance Objects". I noticed that unlike "IntValue", "CFrameValue" can be used to store strings just like a "StringValue". So I wanted to know whats the difference between those two. If possible please give an example of Both these Value being used. Thanks in advance ~UserOnly16Characters.

1 answer

Log in to vote
1
Answered by 9 years ago

CFrameValue and StringValue are just what their name states. CFrameValue is for holding a CFrame value while StringValue is used to hold strings.

Now, to you question on why can CFrameValue hold strings? This is because of a possibility of letters within the value, which you can learn more about in this CFrame article about CFrame.

StringValue is made for strings, so you wouldn't be able to use CFrameValues for the purpose of a String!

Now, I made a script to assign a CFrame Value and String Value then print it. Values are inside of said script:

script.CFrameValue.Value = game.Workspace.SpecialPart.CFrame
print(script.CFrameValue.Value)
wait(3)
script.StringValue.Value = game.Workspace.SpecialPart.Name
print(script.StringValue.Value)

My CFrame value is 0, 20, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, You'll notice commas were printed, IntValue cannot have these. My String value is SpecialPart

You can look up StringValue and CFrame value in the Roblox Wiki!

0
I cannot say for sure if there will be "letters" in the output, but I cannot see why you'd use CFrame for a string, I cannot even find Value within it. alphawolvess 1784 — 9y
Ad

Answer this question