Studio Bug: Script clones the script's parent, and gives cloned parent no root

Bug:

When I try to move a cloned part creates by a script using the move tool, I get a warning:

image

When I try to move the cloned parts either on the client or in game, the warning never appears.

Server script, inside of a part:

local target = workspace.Part1
local clonedVirus

script.Parent.Position = target.Position
for i = 1,5 do
	clonedVirus = script.Parent:Clone()
	clonedVirus.Parent = workspace
end
target:Destroy()

Date and time when it first happened:

Date format: MM/DD/YYYY

10/2/2021

8:56 AM PDT

Percentage of the bug happening:

100%

Reproduction steps:

  1. Create 2 parts, and name them differently
  2. Insert a script in one of them with the following code:
local target = workspace.Part1 --Change this to the location of the part without the script.
local clonedVirus

script.Parent.Position = target.Position
for i = 1,5 do
	clonedVirus = script.Parent:Clone()
	clonedVirus.Parent = workspace
end
target:Destroy()
  1. Make sure you click “Run” or press F8 to start the scripts.
  2. Select all the cloned parts how ever you like, and them move the parts with the move tool.

Video of bug in action:

Place Download:

buggedpartroot.rbxl (23.0 KB)

Please notify me if I did not specify something important, this is my first time reporting a bug.

2 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

2 Likes

Thank you very much for this repro! I’ve been on the lookout for a way to reproduce this for months!

I should be able to hide the warning now and get a fix in for this.

5 Likes

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