generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: until #Player[i]

Previous Thread :: Next Thread 
brayden99 is not online. 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
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
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 is not online. 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
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
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 is not online. brayden99
Joined: 30 Sep 2007
Total Posts: 1243
22 Oct 2012 06:54 PM
Thanks.
Report Abuse
rayoma is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image