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 » Scripters
Home Search
 

Re: Anyone here able to do JavaScript? I NEED HELP

Previous Thread :: Next Thread 
7Spawn is not online. 7Spawn
Joined: 05 Aug 2009
Total Posts: 8030
11 Jul 2016 08:22 AM
Post here or PM me if u can do JavaScript


Moolah // R$303
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
11 Jul 2016 08:30 AM
Post your question and I can solve it.
Report Abuse
7Spawn is not online. 7Spawn
Joined: 05 Aug 2009
Total Posts: 8030
11 Jul 2016 08:31 AM
how do I loop a full script, thats my question.

I want a script to loop over and over again rather than running once


Moolah // R$303
Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
11 Jul 2016 08:33 AM
Set your script as a function and loop it in a while loop?
Report Abuse
7Spawn is not online. 7Spawn
Joined: 05 Aug 2009
Total Posts: 8030
11 Jul 2016 08:34 AM
I dont even know, is it the same as Lua's while loop?


Moolah // R$303
Report Abuse
ColonySimulator is not online. ColonySimulator
Joined: 05 Jul 2015
Total Posts: 1721
11 Jul 2016 08:35 AM
while (argument) {
function();
}
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
11 Jul 2016 08:37 AM
Just know that is a bad way to "loop" in JavaScript. It'll run at an amazing speed and JavaScript is non-blocking, so yielding won't work.

Use setInterval()

setInterval(function(){
-- code
}, 500);

That will run every 500 milliseconds, or 0.5 seconds.
Report Abuse
7Spawn is not online. 7Spawn
Joined: 05 Aug 2009
Total Posts: 8030
11 Jul 2016 08:38 AM
Ye thats what I just used the timeout thing, thanks


Moolah // R$303
Report Abuse
12312312312312312345 is not online. 12312312312312312345
Joined: 07 Aug 2012
Total Posts: 107
11 Jul 2016 09:01 AM
@Nox

I used ur way and it gave me the error code "Uncaught SyntaxError: Unexpected identifier"
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
11 Jul 2016 09:15 AM
Because you left the

-- code

Part in there >.>
Report Abuse
12312312312312312345 is not online. 12312312312312312345
Joined: 07 Aug 2012
Total Posts: 107
11 Jul 2016 09:16 AM
I didnt >.>


Moolah // R$133
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
11 Jul 2016 09:22 AM
What exactly re you putting and in where. Because that code is perfectly valid.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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