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

How do I insert a GUI into all players?

Asked by
NecoBoss 194
10 years ago

I am trying to insert a GUI into all the players in the server but I don't know how to. Anyone know?

2 answers

Log in to vote
1
Answered by
HexC3D 830 Moderation Voter
10 years ago

But the gui in Lighting and put this script in Workspace.

for i,v in pairs (game.Players:GetPlayers()) do
game.Lighting.ScreenGui:Clone().Parent = v:WaitForDataReady("PlayerGui")
end

+1 if answered your question and helped you check mark :)

Ad
Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

Well, if you want it to stay with them after they reset, then just place it in StarterGui. If you want it to be like some sort of one-time thing, then here:

a = game.Lighting["Gui name here"]

for i,v in pairs(game.Players:GetChildren()) do
    a:clone().Parent = v.PlayerGui
end

Answer this question