Why won't the Guis clone in to the PlayersGui folder(Line 12)? I have no errors at all.
The script is setup like this.
while wait() do
for _,Player in pairs (game.Players:GetChildren()) do
-------------------------------------------------------
local Part = script.Parent
local Character = Player.Character
local Distance = (Character.Torso.Position - Part.Position).magnitude
local HasGui = false
-------------------------------------------------------
print(Distance)
if Distance < 4 then
CopyGuis = coroutine.create(function()
for _,Guis in pairs (Part.GuiFolder:GetChildren())do
CopiedGuis = Guis:Clone()
CopiedGuis.Parent = Player.PlayerGui
FoundCopyGuis = Player.PlayerGui:FindFirstChild(CopiedGui)
if FoundCopyGuis then
coroutine.yield(CopyGuis)
print("This player has all guis")
else
coroutine.resume(CopyGuis)
end
end
end)
end
end
end

1 comment
Please tab correct