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.
@Deniied
16 күн бұрын
Please do not expose the backdoor in the ROBLOX Source code.
@mogaming163
17 күн бұрын
🗣🔥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!
@aminaye1316
16 күн бұрын
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 :)
@kylehickmen1684
16 күн бұрын
parallel lua video in the works?
@crusherfire1
16 күн бұрын
This was very neat! I enjoy these kinds of videos :)
@seadrown6252
15 күн бұрын
You're goated
@maxwell_edison
17 күн бұрын
Crazy useful to know! Should be easy enough to workaround.
@BrawlDevRBLX
16 күн бұрын
Fascinating
@Mars-ws9cm
17 күн бұрын
yay new video!
@jukepilot
17 күн бұрын
e_2
@MS-lb9yd
16 күн бұрын
What studio theme do u use?
@KashTheKingYT
13 күн бұрын
Very cool
@Curtis_11
17 күн бұрын
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?
@binaryparrot3352
16 күн бұрын
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_11
16 күн бұрын
@@binaryparrot3352 Ahh right, I see that now. Thanks
@wedoalittletrolling723
16 күн бұрын
@@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
@clocky5018
17 күн бұрын
thanks!
@eliteengineer7340
16 күн бұрын
I just dont use task.wait() without args, its ambious and doesnt make sense, if you want to wait a frame wait a frame
@wedoalittletrolling723
16 күн бұрын
fr, or even just learn how to time events using delta time
@sleitnick1
16 күн бұрын
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.
@eliteengineer7340
16 күн бұрын
@@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.
@eliteengineer7340
16 күн бұрын
@@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
@ZeroManYT
16 күн бұрын
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.
@yourcomputerhasdied
17 күн бұрын
task.wait() waits until a Heartbeat, and wait() doesn't The question is, what does wait() wait for?
@bacon_208
17 күн бұрын
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...
@littensy
17 күн бұрын
wait() is based on an older 30hz system, and the minimum it will wait is 29ms!
@Focusluvyou
17 күн бұрын
@@littensy source?
@radwl
16 күн бұрын
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
@koye4427
16 күн бұрын
wait() uses an old, throttled system that may or may not resume execution after some time has passed
@StarJ3M
17 күн бұрын
hi guys
@HashCollision
17 күн бұрын
Thanks for explaining all this, Sleitnick.
@minerssp4363
17 күн бұрын
How is your life goin?
@ahmoin
16 күн бұрын
task.wait(), what?
@miffclick3358
17 күн бұрын
Stop click baiting.
@dimitar.bogdanov
17 күн бұрын
It’s not clickbait. Someone unfamiliar with the event cycle might be completely confused by this, as it _looks_ broken, but isn’t.
@sleitnick1
17 күн бұрын
@@dimitar.bogdanov That's why I made this. I was quite confused at what was going on at first.
@bacon_208
17 күн бұрын
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.mp3
16 күн бұрын
@@sleitnick1ignore the OP. Ive seen this guy hate on other developer youtubers like crusherfire.
Пікірлер: 46