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: RunService

Previous Thread :: Next Thread 
Majorhappenings is not online. Majorhappenings
Joined: 25 Dec 2013
Total Posts: 299
11 Jan 2014 03:58 PM
What does this do versus wait()?

r = game:GetService("RunService")

r.Stepped:wait()


Report Abuse
Majorhappenings is not online. Majorhappenings
Joined: 25 Dec 2013
Total Posts: 299
11 Jan 2014 03:59 PM
:)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Jan 2014 04:00 PM
It just waits until RunService Stepped is ran.
So it's pretty much like doing:

x = Game:GetService("RunService").Stepped:connect(function() end)
x:disconnect()
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Jan 2014 04:00 PM
x:disconnect() in the inside of the function
x = Game:GetService("RunService").Stepped:connect(function() x:disconnect() end)
Report Abuse
Majorhappenings is not online. Majorhappenings
Joined: 25 Dec 2013
Total Posts: 299
11 Jan 2014 04:03 PM
Thanks man, and what does Stepped mean exactly? :)
Report Abuse
Majorhappenings is not online. Majorhappenings
Joined: 25 Dec 2013
Total Posts: 299
11 Jan 2014 04:04 PM
Sorry, lol I'm not use to Roblox studio and Roblox's methods yet.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Jan 2014 04:04 PM
Wait(1/30) pretty much
Report Abuse
Majorhappenings is not online. Majorhappenings
Joined: 25 Dec 2013
Total Posts: 299
11 Jan 2014 04:06 PM
Alrighty so I assume it's more accurate, and is better to be used rather than wait()? for accuracy?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Jan 2014 04:08 PM
Not sure, I would assume so
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
11 Jan 2014 04:13 PM
It can be used as a cheap while wait() do coroutine

game:GetService("RunService").Stepped:connect(function ()
print("Hi")
end)

This is also the same as
Spawn(function ()
while wait() do
print("Hi")
end
end)

You can also sync into roblox's 60 FPS stuff

local t = tick()

game:GetService("RunService").RenderStepped:connect(function ()
print(tick()-t)
end)
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