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

How would you wait for less than .03 seconds?

Asked by 4 years ago
Edited 4 years ago

From what I see on roblox wiki, wait() can only go as fast as .03 seconds. I need to go faster than that. Is there anyway is can go faster, or what is the fastest I can go if I am wrong?

Heres the part of my script that needs the faster wait.

while true do
    wait(.03) --Needs to be .001
    for i, folder in pairs(clockFolder:GetChildren()) do
        local clock = folder.Clock
        local getLength = lengthFolder[folder.Name]:GetPlayingAnimationTracks()
        for i, track in pairs (getLength) do
        if clock.Value >= track.Length then
            clock.Value = 0
        else
            clock.Value = clock.Value + .03 -- Also needs to be .001
        end
        end
    end
end

3 answers

Log in to vote
1
Answered by 4 years ago

It can go to 0.03 only. There could be other ways ( I suggest looking through the web), but I could lag your game, a lot.

0
Shawnyg's comment was better. fireyfoxninja21 9 — 4y
1
technically not a wrong answer, but you should specify which way(s) Shawnyg 4330 — 4y
Ad
Log in to vote
1
Answered by 4 years ago

you could use RunServices Heartbeat or Renderstepped, i think those are fastest but lag a lot

Log in to vote
-1
Answered by 4 years ago
Edited 4 years ago

No I don't think the limit is 0.03s(Not sure, I read it somewhere that the limit is 0,03s too), but according to https://devforum.roblox.com/t/how-to-use-wait-for-less-than-0-1-seconds/413781(Link blocked, you may want to copy and paste). I've seen game that waits up to 0.0000001 and more and this is crazy because this can cause much lag to the game which I don't recommend.

while true do
    wait(.001) -- Nope, the limit is not .03
    for i, folder in pairs(clockFolder:GetChildren()) do
        local clock = folder.Clock
        local getLength = lengthFolder[folder.Name]:GetPlayingAnimationTracks()
        for i, track in pairs (getLength) do
        if clock.Value >= track.Length then
            clock.Value = 0
        else
            clock.Value = clock.Value + .001
        end
        end
    end
end
0
That is not it chief Shawnyg 4330 — 4y
0
what are you rambling about, if you go below 0.03 it sets automatically to 0.03 mkhamster 58 — 4y
0
im just saying according to the forum guest_20I8 266 — 4y
0
@mkhamster What are u talking about? Im not the only one who said that i seen game that waits up to 0.0000001s, even roblox themselves say, and theirs wait even longer. https://blog.roblox.com/2012/05/using-wait-wisely/ guest_20I8 266 — 4y
0
maybe check the date? mkhamster 58 — 4y

Answer this question