Some clarification: - The demonstration shows that `task.wait()` does exactly what it is supposed to do; our assumption that it always waits a frame is wrong. - As framerates are dynamic, there's no magic number to plug into `task.wait()` to wait 1 frame. You as the dev are responsible for understanding this behavior and acting accordingly. - I did not use the global `wait()` function because it is deprecated.
@Deniied16 күн бұрын
Please do not expose the backdoor in the ROBLOX Source code.
@mogaming16317 күн бұрын
🗣🔥WE MAKING IT OUT OF DOCUMENTATION WITH THIS ONE 🔥 Already knew this but I'll be using this to explain it to others so thank you!
@aminaye131616 күн бұрын
Watching this has given me a sudden urge to look at the Roblox engine functions and try to catch anything niche with them, adding more depth to my knowledge, i'd like to see more videos like this :)
@kylehickmen168416 күн бұрын
parallel lua video in the works?
@crusherfire116 күн бұрын
This was very neat! I enjoy these kinds of videos :)
@seadrown625215 күн бұрын
You're goated
@maxwell_edison17 күн бұрын
Crazy useful to know! Should be easy enough to workaround.
@BrawlDevRBLX16 күн бұрын
Fascinating
@Mars-ws9cm17 күн бұрын
yay new video!
@jukepilot17 күн бұрын
e_2
@MS-lb9yd16 күн бұрын
What studio theme do u use?
@KashTheKingYT13 күн бұрын
Very cool
@Curtis_1117 күн бұрын
Is there a particular reason why task.wait waits until the next heartbeat and not the next render step internally? What's the point of that minuscule difference if it's causing unintended behavior?
@binaryparrot335216 күн бұрын
RenderStepped runs right before rendering the frame. The server does not render anything, thus never runs RenderStepped. Also slow running slow code in RenderStepled can significantly drop the frame rate.
@Curtis_1116 күн бұрын
@@binaryparrot3352 Ahh right, I see that now. Thanks
@wedoalittletrolling72316 күн бұрын
@@binaryparrot3352 I mean server can run RenderStepped in studio, but only in studio because of the server window you can switch to. Live games will never have this effectively making RenderStepped on the server useless
@clocky501817 күн бұрын
thanks!
@eliteengineer734016 күн бұрын
I just dont use task.wait() without args, its ambious and doesnt make sense, if you want to wait a frame wait a frame
@wedoalittletrolling72316 күн бұрын
fr, or even just learn how to time events using delta time
@sleitnick116 күн бұрын
I don't understand what you mean, "if you want to wait a frame wait a frame." That's exactly what I'm demonstrating doesn't work as expected. Even if you put `task.wait(0)` you will end up with the same thing. Frames vary in timing, so there's no secret number that waits 1 frame. You as a dev need to be conscious about your current invocation cycle to properly wait a frame.
@eliteengineer734016 күн бұрын
@@sleitnick1 i mean , just runservice.renderstepped:wait() or heartbeat or whatever else you need. That way its more clear whats going on. task.wait might have a specific definition but it's not intuitive what it does.
@eliteengineer734016 күн бұрын
@@sleitnick1 I mean that since task.wait() is so ambigous just use RunService.Heartbeat:Wait() or the other events, since they are more specific , it's more intuitive , you know exactly whats going on
@ZeroManYT16 күн бұрын
Could you not just do task.wait(1) in the instances where the time diffrences are the same , although i agree dose seem to be broke.
@yourcomputerhasdied17 күн бұрын
task.wait() waits until a Heartbeat, and wait() doesn't The question is, what does wait() wait for?
@bacon_20817 күн бұрын
task.wait() waits for the time given then heartbeat wait() waits for the time given and does other stuff you never asked it to do unless the joke is that you haven't provided an arg which in that case, it do be like that...
@littensy17 күн бұрын
wait() is based on an older 30hz system, and the minimum it will wait is 29ms!
@Focusluvyou17 күн бұрын
@@littensy source?
@radwl16 күн бұрын
wait() has some dark magic type of waiting that is meant to wait for like 30ms, but in reality it can wait as much as a minute, nobody knows why, but at some point in development your wait() will start to get slower and slower and can go up to tens of seconds of delay to each wait that you use
@koye442716 күн бұрын
wait() uses an old, throttled system that may or may not resume execution after some time has passed
@StarJ3M17 күн бұрын
hi guys
@HashCollision17 күн бұрын
Thanks for explaining all this, Sleitnick.
@minerssp436317 күн бұрын
How is your life goin?
@ahmoin16 күн бұрын
task.wait(), what?
@miffclick335817 күн бұрын
Stop click baiting.
@dimitar.bogdanov17 күн бұрын
It’s not clickbait. Someone unfamiliar with the event cycle might be completely confused by this, as it _looks_ broken, but isn’t.
@sleitnick117 күн бұрын
@@dimitar.bogdanov That's why I made this. I was quite confused at what was going on at first.
@bacon_20817 күн бұрын
if someone wasn't aware that task.wait() runs at heartbeat or at least summarised it as every other frame (because that's usually the context in which task.wait() is used) then this video is pretty valuable and straight to the point as well definitely not click bait. The title is obv trying to grab your attention because that's how the algorithm is but it proposes a question instead of a statement so it's not wrong
@vyntax.mp316 күн бұрын
@@sleitnick1ignore the OP. Ive seen this guy hate on other developer youtubers like crusherfire.