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

Is it possible to convert an object value into that object?

Asked by 4 years ago

So i'm trying to change some object's properties but i only have it's object value stored in an ObjectValue instance. Could i somehow refer to it with it's object value?

1 answer

Log in to vote
1
Answered by 4 years ago

You can use objectValue.Value to get the object. For example if I wanted the name of an object from just an object value, I could use

objectValue.Value.Name
--or
local obj = objectValue.Value
obj.Name
0
Yeah but lets say i wanted to delete that object. How could i refer to it to say object:Destroy() SRdeagle 7 — 4y
0
local obj = objectValue.Value and obj:Destroy() robloxianmirror 57 — 4y
Ad

Answer this question