ObjectValue gets set to nil when changing its parent

Reproduction Steps
When you set an ObjectValues Value property to an object, then you copy and paste that ObjectValue, or simply just drag and drop the ObjectValue to somewhere else, it resets the Value property to nil.

Very easy to reproduce. Simply create an ObjectValue, set its Value, then just move the ObjectValue to somewhere else and the Value will reset to nil

Expected Behavior
The Value to carry over when parent is changed

Actual Behavior
Value gets reset to nil when changing parent

Workaround
At the moment, no

Issue Area: Engine
Impact: High
Frequency: Constantly
Date First Experienced: 0202-01-01 00:01:00 (+07:43)

3 Likes

Should this be in https://devforum.roblox.com/c/bug-reports/studio-bugs/29 ?

I just tried this, and my result was that the Value disappeared when

  • Using copy
  • Using cut

It did not disappear when

  • Using drag
  • Using duplicate

I’m not a Studio engineer, so I can’t speak to design intent, but I can offer some explanation.

Copy and paste essentially saves a model file to your clipboard, so all external references outside of the selection will be lost. Nothing special about ObjectValues, it’s the same for all Intance reference properties.

There are some ambiguous cases. Internal references to other objects inside the selection should obviously reference the corresponding cloned instances in the new cloned selection, but if we just preserved all external references it’s not always clearly great. What about something like copy pasting a part with a weld as a child? Should your pasted in instance come in welded to the same point on Baseplate for free? Should welds be a special case? What about other Constraints? Honestly, not sure what should happen then.

7 Likes