Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Quick and simple question?

Is wait(1/math.huge) faster than wait()?

2 comments

0

1/math.huge is just 0 (check yourself). Don't do silly things like that -- you very rarely want to deal with infinities.

0

It's the same as wait(0), so no. The fastest waits would be RunService.Stepped and RunService.RenderStepped( client scripts only ), for they fire 30 and 60 times a second, respectively.

2 answers

✓ Accepted answer

wait() is faster; proven using some simple ticks. Seems to be a tad different of around .01 seconds:

bob = tick()
wait(1/math.huge)
now = tick()
print(now - bob,"---")
steve = tick()
wait()
john = tick()
print(john - steve)

Output: 0.046874284744263 --- 0.032794237136841

The fastest available loop in ROBLOX is RunService:

local rs=game:GetService("RunService")
rs.RenderStepped:connect(function()
-- Put code to run every frame
end

This discussion is preserved as it was. New answers, comments, and votes are closed.