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: Wait()

Previous Thread :: Next Thread 
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
27 Apr 2014 12:19 PM
How long is a wait() and how long is a wait(0)?
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
27 Apr 2014 12:21 PM
[ Content Deleted ]
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
27 Apr 2014 12:21 PM
I believe wait() is 1/30th of a frame and wait(0) is 2/30th
Or something along these lines, it could be:
1 frame for wait() and 2 frames for wait(0)
Not sure though.
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
27 Apr 2014 12:22 PM
wait() waits the same time as wait(0)- around 1/30th of a second. This is the minimum wait() can go.
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
27 Apr 2014 12:23 PM
The Event "game.RunService.Heartbeat" triggers every 1/60 of a second
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
27 Apr 2014 12:24 PM
game.RunService.Heartbeat
How would I use this..?
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
27 Apr 2014 12:25 PM
wait(game.RunService.Heartbeat)?
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
27 Apr 2014 12:25 PM
game:GetService("RunService").Heartbeat:connect(function()
end)
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
27 Apr 2014 12:26 PM
Thanks.
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
27 Apr 2014 12:26 PM
No it's an event, which is triggered, so

game.RunService.HeartBeat:conncet( FunctionToRunWhenEventIsTriggered() )
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
27 Apr 2014 12:27 PM
Thank you. I was using wait() and it was just a hair to short, so now I am using wait(.06) instead
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
27 Apr 2014 12:30 PM
So.. How would I do it in this..?

mouse.Move:connect(function()
while DeBounce and mouse.Target do
draw()
end
end)
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
27 Apr 2014 12:30 PM
One way of making wait() go faster which is ugly and should only be used for experimental work is making a loop only wait sometimes...
So something like this:

while true do

if math.random(1,2)==1 then
wait()
end

end
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
27 Apr 2014 12:41 PM
Is this how I would connect it..?

mouse.Move:connect(mouseismoving)
game.RunService.HeartBeat:conncet(mouseismoving)
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