I'm trying to get the name of the object but I need to convert it into a string to do so.
local objectvalue = script.Parent.Parent.Parent.Parent.ObjectValue local pstring = tostring(objectvalue.Value) print(pstring)
This code just prints out nil (I need it to print out the value name). How would I be able to get the name of the value stored inside of the ObjectValue?
ObjectValueto a string, it will always hold an
Instance, unless you set the
nil. You can
tostringthe object and store it in a variable, but that's about it. If you really wanted to hold a string, use a
StringValue, Whenever you assign the
Value, assign it the name of the object instead.