Studio seemingly lies about cloning a screengui?

The code I’m having an issue with is this (in a client script):

Clickable.MouseClick:Connect(function()

	GameFolder.Stage:Clone().Parent = workspace.ArcadeGame
	GameFolder.NoobBoy3D:Clone().Parent = Player.PlayerGui
	
	Player.PlayerGui:WaitForChild('NoobBoy3D')
	print(Player.PlayerGui:WaitForChild('NoobBoy3D'))
	
	Player.Character = workspace.ArcadeGame.Stage.Noob
	
	workspace.CurrentCamera.Focus = workspace.ArcadeGame.Stage.Screen.CFrame
	workspace.CurrentCamera.CameraType = 'Scriptable'
	workspace.CurrentCamera.CFrame = CFrame.new(-250,40,-200) * CFrame.Angles(0,math.rad(-90),0)
	workspace.CurrentCamera.FieldOfView = 30
	
	Stage = workspace.ArcadeGame
	Score = Player.PlayerGui.NoobBoy3D.Score
	
	GameLoop()
end)

The GUI exists until Score is set. The print statement prints the GUI. I looked in the explorer and it does not show up for even a frame.

Why don’t you try a longer way of getting round it using variables?

local StageClone = GameFolder.Stage:Clone()
local NoobBoy3DClone = GameFolder.NoobBoy3D:Clone()

StageClone.Parent = workspace.ArcadeGame
NoobBoy3DClone.Parent = Player.PlayerGui

I fixed it by making the gui clone after setting the player.character

Alrighty. Thanks for letting me know.!

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