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

Converting ObjectValue into string doesn't work?

I'm trying to get the value inside of ObjectValue and convert it into string format but I have not been successful in doing so.

local ObjectValue = script.Parent.Parent.Parent.Parent.ObjectValue
local convertstring = tostring(ObjectValue.Value)
print(convertstring)

This code will just print out nil instead of the text of the value stored inside of ObjectValue.

This may be confusing so here is an example: Lets say that the value of the ObjectValue is Textbutton. I would want to get the string "Textbutton".

How would I be able to do this? Any help would be appreciated.

1 answer

You are converting player.Value to a string. I think you mean to convert ObjectValue.Value. Then it should work.

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