[Rather Urgent] Roblox automatically deletes Frame content (Incl. REPO)

REPO FILE: RepoFile.rbxl (14.4 KB)

Repo instructions:

  1. Start a local server with 1 player
  2. Notice how the frames content is deleted after adding it to a new frame.
  3. Done.

Issue
When parenting a Frame to another Frame, it deletes the content of the child frame IF the frame in question was sent as a function parameter.

This is breaking the store in my game, I already earned little as it was.
Please fix quickly! :grimacing:

I do agree that this behavior seems unintended, but a simple patch is to make the new frame a descendant of PlayerGui before parenting the old frame to it. Simply switch the last two lines of your function.

Original

m.Parent = content
content.Parent = script.Parent

Fixed

content.Parent = script.Parent
m.Parent = content

It may solve the repofile, but it does not work when applied to my real Gui.
Even if this was the work-around it’s still a major glitch that needs to be fixed.

Surely there is some way this can be applied to your real gui. Just make sure that you aren’t parenting existing guis to descendants of nil. I agree that this is a major glitch and needs immediate attention, but I’d hate to see it break a game of yours when a patch is available.

In my GUI I do:

function ModuleAPI:SetFullscreen(frame)
local part = Instance.new("Part",workspace)
part.Anchored = true
part.Transparency = 1

local surface = Instance.new("SurfaceGui")
surface.Face = "Back"
surface.Parent = part

local content = Instance.new("Frame")
content.BackgroundTransparency = 1
content.Size = UDim2.new(1,0,1,-36)
content.Position = UDim2.new(0,0,0,36)

content.Parent = surface



local obj3d = Object3D.create(part,CFrame.new(0,0,0))
obj3d.Background = true
table.insert(objects,obj3d)
part.Anchored = true
part.Parent = cam

print("BEFORE")
local c = frame.StoreFrame:GetChildren()
for i,v in pairs(c) do
	print(v)
end

frame.Parent = content
print(frame.Parent)
print("AFTER")
local c = frame.StoreFrame:GetChildren()
for i,v in pairs(c) do
	print(v)
end

And I still get the error right at AFTER

Edit: Nvm, used play solo. (Wasn’t used to the new ā€œLocal serverā€ terminology)

Yes reproduced successfully.

1 Like

Since you’re using a SurfaceGui, try parenting the SurfaceGui object to PlayerGui and setting surface.Adornee = part. I’ll test it myself as soon as I can.

EDIT:

I slightly modified the code from your original repro file to use a SurfaceGui, and I could not reproduce the problem of children being removed. Is there any other code that modifies the children of the gui?

This is the modified code:

local frame = script.Parent:WaitForChild("Frame")

function func(m)
    local part = Instance.new("Part", game.Workspace)
    local surface = Instance.new("SurfaceGui", part)
	local content = Instance.new("Frame")
	content.BackgroundTransparency = 1
	content.Size = UDim2.new(1,0,1,-36)
	content.Position = UDim2.new(0,0,0,36)
	content.Parent = surface
	m.Parent =content
end

print("BEFORE")
for i,v in pairs(frame:GetChildren()) do
	print(v)
end

func(frame)

print("AFTER")
for i,v in pairs(frame:GetChildren()) do
	print(v)
end

Setting adonree did not help.

I even tried placing the frame in playergui to see if it gets removed then, it doesnt.
So I had it in playergui, when I dragged it from playergui and place it in the frame inside surfacegui then everything inside it got deleted.

I remember something like this being reported before.
Was something like ā€œstuff disappears, unless Play Soloā€ too.

You don’t work at Roblox anymore right?
I thought you said RDC was your last days there.

This is still an issue!
It’s a pretty critical bug seeing as it just randomly deletes content.

Can someone on Roblox look into this?

m a y b e _ y o u _ s h o u l d _ u s e _ f i l t e r i n g e n a b l e d

I do use FE.

Okay well, when I turned on FilteringEnabled in this repro place, the issue wasn’t happening.

I noticed that too, I’ll see if I can improve the repo cause it’s still in my game.

I am going to look into this. If you have a simple repro that happens when the place is filtering enabled, that would be helpful.

You work at Roblox? You don’t have the tag thingy…

Oh well, I tried to create a repo again but it doesn’t seem to work.
I’ll try harder see if I can create one.

I just started interning there again today. I will ask someone about getting the tag :P. Don’t worry too much about a repro that works with FE, I think I know what causes this issue and have a fix for it. I will test this fix more tomorrow and hopefully get it submitted.

1 Like

Dude, that would be totally incredible!

I’v had to have my 3D store disabled for over a week now just because of it.
Would be great to have this fixed!

This issue still occurs, have you uploaded the fix yet?