Last active
March 5, 2021 22:08
-
-
Save Mullets-Gavin/20bd193047754bc01a71d3fe9787b649 to your computer and use it in GitHub Desktop.
Better Roblox wait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local RunService = game:GetService("RunService") | |
| local function Wait(clock: number?): number | |
| clock = clock or 0 | |
| local start = os.clock() | |
| local delta = 0 | |
| repeat | |
| delta += RunService.Stepped:Wait() | |
| until delta >= clock | |
| return os.clock() - start | |
| end | |
| return Wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment