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: Hown would you reset a function?

Previous Thread :: Next Thread 
XxXOneDirectionXxX is not online. XxXOneDirectionXxX
Joined: 06 Apr 2012
Total Posts: 18
09 Apr 2012 10:08 AM
Lets just say my script was just one function.
Function game() for example.
How would you make it reset when everyone dies?
Would you have to create a table or something?
-If cheesecaik were real, id be fake-
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
09 Apr 2012 10:09 AM
I'm kinda confused on what you're saying, do you mean like so the function can run again.
Report Abuse
XxXOneDirectionXxX is not online. XxXOneDirectionXxX
Joined: 06 Apr 2012
Total Posts: 18
09 Apr 2012 10:11 AM
Yh, when eevryone dies.
Report Abuse
XxXOneDirectionXxX is not online. XxXOneDirectionXxX
Joined: 06 Apr 2012
Total Posts: 18
09 Apr 2012 10:12 AM
I meant to say:
Yh but when everyone dies.
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
09 Apr 2012 10:18 AM
game = function()
plrs = game.Players:GetPlayers()
--stuff
repeat wait() until #plrs <= 0
end

while wait() do
game()
end

That will get you started. However, for mine to work you would need a died event that removes them from the plrs table on death.
Report Abuse
XxXOneDirectionXxX is not online. XxXOneDirectionXxX
Joined: 06 Apr 2012
Total Posts: 18
11 Apr 2012 08:57 AM
Thanks.
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