Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago
Edited 7 years ago
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?

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. GoldenPhysics 474 — 7y
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. andrewboy159 18 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
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.

0
Nevermind, thank you for your advice! andrewboy159 18 — 7y
Ad

Answer this question