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

How do ObjectValues work?

Is it like a shortcut to get something? Like this below:

local ObjectValue = Instace.new("ObjectValue")
ObjectValue.Value = game.Workspace.Part

--Would doing:
game.Workspace.Part:Destroy()
--be the same as:
ObjectValue.Value:Destroy()
--????

1 comment

1

That would work, yes

1 answer

✓ Accepted answer

Object values are typically used to communicate objects between scripts. For example, if you want to change the properties of a part and you're using a local script, but filtering wnabled prevents you from doing so, you can change the object value to the object you want changed, and have a server script with a changed event manipulate the object using the given object value. However, his is not the always most efficient method anymore, with the cresting of remote events and remote functions.

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