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

How would I "wait" faster than the default wait time is?

Asked by
Lineout 10
10 years ago

So I have done:

wait()

but that seems to be to slow. Before you say how is that too slow, for my purposes it actually is. Is there anyway to get around it so its like .0001 of a second. I would also like to know what the actually time is for 'wait()', I thought is was .37 of a second or somthing.

Thanks for reading, and have a great day.

2 answers

Log in to vote
1
Answered by 10 years ago

wait() 's minimal time is around .03 seconds

There is no way to make it go under .000001 seconds, as it depends of your computer/the server's frame rate

For an exact time, try

print(wait())

it should display wait's time for you

0
Alright, thank you so much :D Lineout 10 — 10y
1
Last I heard wait was 0.03. User#2 0 — 10y
Ad
Log in to vote
4
Answered by 10 years ago

:wait() yields the current thread for 1/30th of a second, or the integer passed in as an argument.

The only method that will produce the same effect of 'yielding' the current thread with a faster minimum is .onRenderStepped(), which is an Event of RunService that fires when a new frame is drawn.

Since Roblox runs at 60 fps, .onRenderStepped() fires every 1/60th of a second, thereby making it twice as fast as wait().

However, it must be used in a LocalScript, as RunService is a local service.

0
Yeah i forgot about RenderService :) Hippalectryon 3 — 10y
0
RunService* But yeah, I had this come up a little while back, so I'm all studied up :) ChiefWildin 295 — 10y
0
This should be accepted as the best answer MrFlimsy 345 — 10y

Answer this question