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

Why do my GUI's only show up for one player?

Hi

I have a normal game script in the workspace that changes gui's visible/non visible status. It works for one player only, the other players just have no GUI on their screen. I want them to show up for every player. Heres a snippet of my code:




for i,v in pairs(game.Players:GetPlayers()) do

v.PlayerGui.Choosabel.BackgroundFrame.Visible = true
wait(10)
v.PlayerGui.Choosabel.BackgroundFrame.Visible = false



end

4 comments

0

BUMP

0

I would assume that this code runs before the second player is registered in the game; therefore the for loop would only be able to find one player. I suggest that you add some type of wait or repeat loop.

0

Proper indentation is key.

0

You can't access playergui from a server script

1 answer

Maybe you could try this:

game.Players.PlayerAdded:connect(function(Player)
	Player.PlayerGui.Choosabel.BackgroundFrame.Visible = true
	wait(10)
	Player.PlayerGui.Choosabel.BackgroundFrame.Visible = false
end)

Pls vote if it works!!!

1 comment

1

He cannot vote. He has negative reputation

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