Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How small can a wait () be without being 0?

Asked by
Maxomega3 106
10 years ago

I'm messing around with wait (), and I've found out that even though I'm decreasing the wait time in an object by half when it's in motion, it still looks to be around the speed after wait (.0125) seconds.

4 answers

Log in to vote
1
Answered by
duckwit 1404 Moderation Voter
10 years ago

The minimum wait() time is 1/30 of a second (about 0.033), if you need to process something at smaller intervals than that then you'll have to use a LocalScript and connect to the RunService.RenderStepped event, which delays by approximately 1/60 of a second:

game:GetService("RunService").RenderStepped:connect(function()
--Fires around every 1/60 of a second
end)
1
Are you sure you need a LocalScript to use RenderStepped? Maxomega3 106 — 10y
1
Yes, I am sure. Servers (i.e. Global Scripts) don't "Render" anything, they don't have screens to render to, even! RenderStepped is a Local-Only event because it is to do with the Rendering of the Roblox game that you are in on YOUR computer, but no-one else's. duckwit 1404 — 10y
Ad
Log in to vote
-1
Answered by
Kozero 120
10 years ago

The slowest wait is wait() which is per frame.I'm not sure but I think wait() it's equal to 0.0333 seconds.

0
The 'frames' that you refer to are changing at 30 frames-per-second, 1/30 is 0.033 (recurring) not 0.3 - your answer is off by a factor of 10 I'm afraid - that would mean that the smallest wait time is bigger than a quarter of a second! duckwit 1404 — 10y
Log in to vote
-2
Answered by 10 years ago

it can be anywhere between 0.1-what ever number like 200 or something

0
It can be anywhere between 1/30th of a second and forever. Maxomega3 106 — 10y
0
i know forever but just an example danielsarabia11 -2 — 10y
Log in to vote
-3
Answered by 10 years ago

wait() waits for 2 frames, but wait(0) waits for 1 frame.

0
wait() and wait(0) are identical in function, this is a misleading answer - try running it both ways and you'll find that they are the same. duckwit 1404 — 10y
0
I've heard they are different. Maxomega3 106 — 10y
0
When put to the test, I found that wait () was a tiny fraction of a second longer than wait (0) Maxomega3 106 — 10y
0
It was on tip of the day on scripting helpers. Protoduction 216 — 10y

Answer this question