Task Functions (wait(), spawn(), delay()) - Roblox Advanced Scripting #4
BrawlDev · 3,456 words · 17 min read · EN

Below is the complete, readable transcript of Task Functions (wait(), spawn(), delay()) - Roblox Advanced Scripting #4 by BrawlDev on YouTube. Read the full text, copy any part you need, or generate a transcript for any video with our free tool.
hey thanks for stopping by in this episode of my Roblox Advanced scripting tutorial series I'm going to be going over roblox's task scheduler and it's the functions that they've provided to us to be able to use inside of our games not only that but I will be showing how to use these functions
and when to actually use these functions inside of your game so with that being said to understand what I'm talking about let's jump straight into an example all right let's think about this for a minute so over here I basically made some parts that represents tasks and alongside it I have a bunch of other parts that represents the functions that we're going to be using that's provided to
us with the task scheduler so I want you to look at these tasks and imagine them being in inside of a script so we have the very first task that's going to be the first thing that executes whenever we write a script and then we have this be the first thing that runs so let's say inside of a
script we have task one and then we have task two that executes right after task one is over these two tasks will run run one after another once the first task is done and the second one is done but what if we want to add more control to when these tasks actually do run one of the
ways to do it is use a weight statement here um in which we basically just like put this right in between task one and task two where we call in the weight function and give it like a random number of seconds to wait where we're literally telling the script to stop what it's doing before
running task 2 or anything else that's after the weight statement there's also other things like delay uh and this would primarily be used if we want something to run inside of the script after a specific amount of time and uh we can continue running stuff in the meantime while we wait for the task to actually begin so if I bring in task three down here then what's going to happen is
Transcribe another video
Paste any YouTube, Instagram or TikTok link to get a free transcript.