I have a little bar in my frame, and every .025 seconds, I expand it by 1% of the screen's width. I do this 40 times, so it should take 40 seconds. Here's the code:
local start = tick()
for i = 1, 40 do
if hasReleased then break end
gui.Frame.Bar.Size = UDim2.new(gui.Frame.Bar.Size.X.Scale + 0.01, 0, 0.1, 0)
gui.Frame.Bar.Transparency = 0
wait(.025)
print(tick() - start)
end
But each time it prints, instead of increasing by .025, it seems to wait around .03 seconds:
In case it matters, my Roblox Studio default wait() time is 0.010000000000000000208 aka 0.01

12 comments
It's only a 0.05 second difference, it isn't that obvious
Roblox's minimum wait is always going to be 0.029999..., I presume.
It's pretty obvious when I tell my users to wait for 1 second and ends up waiting for 1.333333 seconds.
But we're talking a 0.05 second difference.
OMG it adds up when I'm trying to wait 1 second...
Plus I get really OCD when it doesn't add up exactly to 1 second.
then do .2 LOL
what?
Don't do countdowns like this; do starttime - currenttime to get elapsed time because that doesn't suffer from delays like this
Could you elaborate?
http://robloxdev.com/articles/Built-in-Functions-and-Variables/Roblox > Wait
Roblox are Updating on 1/30 seconds, you can't do the third decimal place.