metatab1e
(meta)
September 12, 2023, 8:48pm
#1
LocalScript is failing to wait ( task.wait ) in a repeat loop.
Currently, it is sending over the values in a RemoteEvent from the server (Getstats),
As you can see it is supposed to wait, but it is not.
I also printed what was sent over as seen in the script, it prints the setting used as not 0 or nil, so what is causing this?
Image:
Any help is appreciated.
mayoozzzz
(mayoozzzz)
September 12, 2023, 8:58pm
#2
How is it failing? You did not explain what is happening. Is it not looping? Is it not doing anything at all?
2 Likes
metatab1e
(meta)
September 12, 2023, 9:09pm
#3
“Failing to wait in loop”
I did explain what was happening
Though I did however just notice some contradicting information.
Apologies.
metatab1e
(meta)
September 12, 2023, 11:13pm
#4
Boosting this post since its been 2 hours
Do print(g_settings.Firerate) before task.wait, and tell me what it prints.
metatab1e
(meta)
September 13, 2023, 12:05am
#6
Printed in output via localscript
metatab1e
(meta)
September 13, 2023, 12:13am
#7
Adding on to this, I don’t think this interval is .6 seconds.
You’re very right, that interval isn’t .6 seconds.
By default, what is g_settings.Firerate?
metatab1e
(meta)
September 13, 2023, 12:34am
#9
All are as they should be. (There’s like 32 guns rigged so I can’t show them all)
Unless the other code is extreeeemely slow there’s still quite a big gap between those two prints. Did you do something to unlock fps?
metatab1e
(meta)
September 13, 2023, 5:12am
#11
Nope. Nothing to unlock fps, I have all of that stuff off while in studio to prevent that kind of stuff.
Computers are computers.
task.wait()
will never be bang-on accurate.
Strange. Either way I’d implement a task.wait that also makes use of deltatime, that way it’ll work and you’ll also stop non-exploiting clients from sending unnecessary remoteevents if they have their fps unlocked.
1 Like