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.
01 | while true do |
02 | wait(. 03 ) --Needs to be .001 |
03 | for i, folder in pairs (clockFolder:GetChildren()) do |
04 | local clock = folder.Clock |
05 | local getLength = lengthFolder [ folder.Name ] :GetPlayingAnimationTracks() |
06 | for i, track in pairs (getLength) do |
07 | if clock.Value > = track.Length then |
08 | clock.Value = 0 |
09 | else |
10 | clock.Value = clock.Value + . 03 -- Also needs to be .001 |
11 | end |
12 | end |
13 | end |
14 | end |
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.
you could use RunServices Heartbeat or Renderstepped, i think those are fastest but lag a lot
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.
01 | while true do |
02 | wait(. 001 ) -- Nope, the limit is not .03 |
03 | for i, folder in pairs (clockFolder:GetChildren()) do |
04 | local clock = folder.Clock |
05 | local getLength = lengthFolder [ folder.Name ] :GetPlayingAnimationTracks() |
06 | for i, track in pairs (getLength) do |
07 | if clock.Value > = track.Length then |
08 | clock.Value = 0 |
09 | else |
10 | clock.Value = clock.Value + . 001 |
11 | end |
12 | end |
13 | end |
14 | end |