What would be better for a singleplayer game with almost only localscripts?

Hey there! Can someone tell me what would be better for a singleplayer game with almost no server scripts; task.wait() or just wait()? I’m pretty sure task.wait relies on the server, which is what I don’t want. I want most things to rely on the client so it plays the smoothest with no lag from the server. I know it’s very easy for people to exploit this way, but since it’s a singleplayer game, i wouldn’t really care.

1 Like

task.wait() is basically the new and improve wait(). task.wait() does not rely on the server, and has the increased benefit over wait of not throttling. You can read more about it here, or watch a good example of the difference here.

1 Like

‘‘wait()’’ relies on the server has has 30 fps im sure while ‘‘task.wait()’’ doesnt and is overall more useful

wait() has been deprecated, from what i’ve read, task.wait()'s yield time may vary, so you could try clamping its yield time using math.floor(task.wait()) though, im not sure how well this method works.

You can find more info about task.wait() here: Task Library - Now Available!

1 Like

So task.wait() is just better in every way possible? or are there also good reasons to still use wait()?

From everything I have seen and heard there is no reason to use wait() any more. The wait() function is even deprecated at this current time.

1 Like

task.wait is better yeah

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.