I'm doing a check to see if someone has a shirt, and if they do clone a gui into the players gui.
but whenever I move it, it deletes the children..
Code
local Player = game.Players.LocalPlayer
local Items = {291002383,291002527,291002685,291003057,291004569,342437379}
local Owns = function()
for i = 1, #Items do
if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, tonumber(Items[i])) then
local gui = script.Guis.gui
local CGui = gui:Clone()
CGui.Parent = Player.PlayerGui
print(CGui.Parent)
return true
end
end
return false
end
11:28:07.711 - Something unexpectedly tried to set the parent of gui to NULL while trying to set the parent of gui. Current parent is PlayerGui.
Help? If you need more of an explanation, please post a comment

8 comments
Using a module script. ;)
It doesn't matter. A ModuleScript inherits the (used loosely) it's used from, and if that's a LocalScript then the ModuleScript is treated as a LocalScript.
How long should I wait then?
Not actually sure. c:
Our end solution for Valkyrie was to not move it to PlayerGui at all. We ended up with a weird solution for it.
Well, I need it in that on persons gui. What was the weird solution?
Not one that will work here. Where is script?
Well, the module script can't be moved or other scripts will break. I'll find another way. Weird that other guis work just fine moving but ok