Skip to content

Instantly share code, notes, and snippets.

@Mullets-Gavin
Last active March 5, 2021 22:08
Show Gist options
  • Select an option

  • Save Mullets-Gavin/20bd193047754bc01a71d3fe9787b649 to your computer and use it in GitHub Desktop.

Select an option

Save Mullets-Gavin/20bd193047754bc01a71d3fe9787b649 to your computer and use it in GitHub Desktop.
Better Roblox wait
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