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

GUI keeps disappears when rejoining?

When I spawn in my game , I get a GUI When I leave the game and rejoin the GUI is disappeared. You get the GUI by being on a certain team color.

game.Players.PlayerAdded:connect(function(plr)
	if plr.TeamColor == BrickColor.new("Bright red") then
		local gui = game.ReplicatedStorage.EditorGui
		gui.Parent = plr.PlayerGui;
	end
	end)

game.Players.PlayerAdded:connect(function(plr)
 plr.CharacterAdded:connect(function(char)
  wait()
  char.Parent = game:WaitForChild('Lighting')
  plr:WaitForChild("PlayerGui") .EditorGui.Enabled = true
 end)
end)

I need help to get it where it will always spawn GUI every new Player joined.

I

2 comments

0

Isn't it easier to put it on starterGui and then copy it to local player's playergui? Why bother putting it on replicated storage? Sounds like more work for me or I may just be dumb.

0

line 3 should be game.ReplicatedStorage.EditorGui:Clone()

1 answer

local gui = game.ReplicatedStorage.EditorGui:Clone()

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