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 » Game Design
Home Search
 

Re: Best way to loop a script?

Previous Thread :: Next Thread 
Codys4x4 is not online. Codys4x4
Joined: 14 Oct 2006
Total Posts: 2312
16 Dec 2014 05:55 PM
Try'ed this below, but when the game is running and StartGame is set to true the if statement stays the same.
So when you start the game, what ever the StartGame.Value was it never prints anything different.

print("Started Game Script.")
Run = workspace.StartGame.Value

while true do
wait(1)
if Run == true then
print("Starting")
else
print("No Start")
end
end
Report Abuse
ComradeREKTangle is online. ComradeREKTangle
Joined: 07 Feb 2010
Total Posts: 850
16 Dec 2014 06:04 PM
use debounce

if deb = false

if deb == false

then deb = true



wait(12321)

deb = false

end
Report Abuse
Codys4x4 is not online. Codys4x4
Joined: 14 Oct 2006
Total Posts: 2312
16 Dec 2014 06:20 PM
I need something like my code to work tho.

I need to be able to set it in game, this script is in workspace.
Report Abuse
TerraNation is not online. TerraNation
Joined: 08 Dec 2014
Total Posts: 276
16 Dec 2014 06:20 PM
bump
Report Abuse
1Juice1 is not online. 1Juice1
Joined: 03 Jul 2014
Total Posts: 108
16 Dec 2014 06:40 PM
Try this:

-----------------------------------
Run = game.Workspace.StartGame.Value

while true do
wait(1)
if Run == true then
print("Starting")
else
print("No Start")
end end
---------------------------------
~Arm the homeless
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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