Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Login Gui clones in test mode but not real game. Can anyone help? [SOLVED]

game.Players.PlayerAdded:connect(function(Player)
	

local PlayerGui = Player.PlayerGui


local AM = script.Admin
AM.Disabled = false

local c = script.Login:Clone()
c.Parent = PlayerGui


return nil
end)

What happens is the Login does not Clone to PlayerGui in the actual game, but it does in test. Even when I do it manually with :explorer from scripth's admin, the gui doesn't work, even though it works in test mode. Does anyone know what's going on?

2 comments

0

You don't need return nil at all, and you should probably wait to make sure the playergui has loaded. Also, make sure this is in a regular script, not a local script.

0

it is a regular script, and I've tried without return nil, i just was trying stuff out so I forgot to comment it out. Thanks, ill try waiting.

1 answer

game.Players.PlayerAdded:connect(function(Player)
	

local PlayerGui = Player.PlayerGui


local AM = script.Admin
AM.Disabled = false

Player:WaitForChild("PlayerGui")
local c = script.Login:Clone()
c.Parent = PlayerGui


--return nil
end)

I tried this. Didn't work, could you post some code I could try, you seem much more experienced with this.

1 comment

0

Nevermind, thank you for your advice!

This discussion is preserved as it was. New answers, comments, and votes are closed.