brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 22 Oct 2012 06:25 PM |
How can I make this repeat until it's in eveyone in the games playergui?
Player = game.Players:GetChildren() repeat wait() Gui = script.GameOverGui:Clone() for i = 1,#Player do --My code would go here Gui.Parent = Player[i].PlayerGui until #Player[i].PlayerGui:FindFirstChild(Gui) ~= nil --I just guessed but it didnt work |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2012 06:29 PM |
local Player=game.Players:GetPlayers() for i=1,#Player do script.GameOverGui:Clone().Parent=p[i].PlayerGui
Simply doing that will place the GUI into all the player's PlayerGuis. |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 22 Oct 2012 06:44 PM |
| Yes but I need it to repeat the prosess a few times because this doesnt play until a sertain score limit is reached, And the score limit is reached when a player is killed and I need the gui to be on his screen once he respawns |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2012 06:47 PM |
local Player=game:GetService("Players"):GetPlayers() for i=1,#Player do script:FindFirstChild("GameOverGui"):Clone().Parent=p[i]:FindFirstChild("PlayerGui") if p[i].Character:FindFirstChild("Humanoid").Health==0 then p[i].CharacterAdded:wait() script:FindFirstChild("GameOverGui"):Clone().Parent=p[i]:FindFirstChild("PlayerGui") end end |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
| |
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 22 Oct 2012 06:54 PM |
| Usually what I do is have the GUI always be present and whenever you need it to show, do a for loop and have it make it visible on everyone's screen. |
|
|
| Report Abuse |
|
|