Feedback on "ObjectValue"

Improve ObjectValue documentation to describe (or affirm) behavior with (StreamingEnabled) replication.

Specifically things such as:

  • Is the value nil if the reference instance is yet to be replicated?
  • Will the Changed event fire upon replication of the reference instance?

Affected URL: https://create.roblox.com/docs/reference/engine/classes/ObjectValue

3 Likes

Yes.

Yes, but only when it gets sent the first time. If it streams-out, the value is still held, somehow, and while it doesn’t exist in the Explorer, printing the value at this stage still shows “Part” in Output. Though, clicking it to get the part itself does nothing.

If it streams-out, the value is still held, somehow, and while it doesn’t exist in the Explorer

As long as an instance is referenced it will always exist in-memory. Instance:Destroy

Stream out does not destroy or unload instances it merely unparents them. This is the same for Atomic models, they are not destroyed they are just parented to nil.

https://create.roblox.com/docs/workspace/streaming#stream-out

When an instance streams out, it is parented to nil so that any existing Luau state will reconnect if the instance streams back in. As a result, removal signals such as ChildRemoved or DescendantRemoving fire on its parent or ancestor, but the instance itself is not destroyed in the same sense as an Instance:Destroy() call.

@catinpsyop @BossSpax right, thank you. Still, the other informations should be accurate, due to testing.

2 Likes

Hey astriddd, thanks for the report. I’ve added a short paragraph to the page regarding streaming. This has also kicked off a bit of an internal investigation into stream out behavior, with some inconclusive results so far, but it’s possible we’ll add a bit more to the paragraph over time. Thanks again!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.