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
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.
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.