LocalScript failing to wait in loop

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.

How is it failing? You did not explain what is happening. Is it not looping? Is it not doing anything at all?

2 Likes

“Failing to wait in loop”
I did explain what was happening

Though I did however just notice some contradicting information.
Apologies.

Boosting this post since its been 2 hours

Do print(g_settings.Firerate) before task.wait, and tell me what it prints.

image

Printed in output via localscript

Adding on to this, I don’t think this interval is .6 seconds.
image

You’re very right, that interval isn’t .6 seconds.
By default, what is g_settings.Firerate?

All are as they should be. (There’s like 32 guns rigged so I can’t show them all)
image

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?

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