Setting parent property via object selector deletes object if cancelled

The useful ability to select an object’s parent by clicking on it in the workspace or explorer is very helpful. There seems to be a regression related to the cancel button, though. When the cancel button is clicked, the object disappears.

image

Reproduce:

  1. click on Parent field in Properties
  2. click on cancel button in Parent field in Properties
  3. object disappears

Expectation:
Object does not disappear when cancel button is clicked

1 Like

That’s not a cancel button, it’s a clear button. The same happens for ObjectValue’s Value, Attachment and Adornee properties, etc. Clicking that sets the reference to nil.

“Cancel” implies it goes back to its previous value, which doesn’t happen in any of the cases above as it’s not the intended purpose.

If you set the Parent to nil, it will disappear from the Workspace.

5 Likes

I seem to remember when this was first introduced, it was a cancel button.

If I wanted to delete a part, I would press DELETE instead of clicking the property button and then clicking the “clear” button.

You’re thinking about it as if the Parent field has special meaning. It doesn’t currently. It’s treated the same as any other object reference, and if you click the red X on any of them, it clears the reference and sets it to nil.

If you’re asking for the Parent field to be treated differently and for different logic to be used there, then you should file a feature request. A feature that doesn’t exist is not inherently a bug.

It’s important that this button is a clear button or you’d have to use the command bar to clear the Value of an ObjectValue or to clear the PrimaryPart, Adornee, Attachment or any other field that uses an object reference.

Currently, as it has always been, the Parent property is treated the same as these other properties, and therefore has the same clear feature in Studio.

2 Likes

I know the difference between a feature and a bug. I said that I remember this not happening when the feature was first introduced, so I filed it under bug reports. If someone else can corroborate that it’s always deleted the intstance, I’ll file it under feature requests.

As you have read, this bug report is about the Parent property of a part. This bug report is not about the Adornee, PrimaryPart, Part0, Part1, Attachment0, Attachment1, Value, or other instance properties. They are irrelevant to this bug report.

I’m confused about how clearing the Parent property of an Instance is a bug, logically, if the parent is nil, it is basically gone. Using Esc to cancel the selection works on my machine.

1 Like

Hello! Thanks for the report. As explained in the first reply, that is a Clear button.

2 Likes

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