Roblox Devs, stop misusing :WaitForChild()!

  Рет қаралды 75,606

Crusherfire

Crusherfire

Күн бұрын

Пікірлер: 425
@crusherfire1
@crusherfire1 11 ай бұрын
Do you know someone who is horribly mistreating and abusing WaitForChild()?!? Send em this video and let the WaitForChild abuse finally end!
@Czectly
@Czectly 11 ай бұрын
i spam findfirstchild() way to much lmao even when it already exists sometimes
@Czectly
@Czectly 11 ай бұрын
0:48 does anybody actually do that? i've never seen people on dev forum post anything like that
@Czectly
@Czectly 11 ай бұрын
7:00 never seen anybody make that mistake
@crusherfire1
@crusherfire1 11 ай бұрын
@@Czectly "does anybody actually do that?" Oh 100%, especially any beginners who don't really know about WaitForChild. When I first learned scripting, the tutorials I watched had people doing that lol
@Czectly
@Czectly 11 ай бұрын
off topic but do you know what ConnectParallel() is any time i type function it has came up and their is like little to no info online about i tried messing around with and couldn't figure out what it did i have over 2 years of lua coding experience. every time i connect function it auto pops up and i want to know what it is badly even if it's useless engine feature @@crusherfire1
@mrstarfish
@mrstarfish 10 ай бұрын
The habit is so built in, anytime I don’t see WaitForChild at the start of my scripts I always get the feeling that a laggy client will end up erroring everything, my palms get sweaty, knees weak, arms get heavy.
@SilliousBillious
@SilliousBillious 10 ай бұрын
Mom’s spaghetti 🤑
@Raykiv
@Raykiv 10 ай бұрын
@@SilliousBillious The next lyric was about Vomit on a sweater >:C
@SilliousBillious
@SilliousBillious 10 ай бұрын
@@Raykiv ye ik it’s like there’s vomit on his sweater already I just said that cuz it’s a funny line lol
@thex2983
@thex2983 4 ай бұрын
He's nervous, but on the surface he looks calm and ready, to write codes. But he keeps on forgetting what he wrote down The output goes so loud. He opens his script but the codes won't come out. He's burning out. All the code is broken now. The clock's run out. Time is up, over blow!
@notfakepixxel
@notfakepixxel 4 ай бұрын
@@thex2983 To find it's finality, get script locality Breaking your habit, it's broke, WaitForChild() you spoke, just far too easily No, he won't have it he knows His whole back's to this code, it don't matter it's broke He knows that but he's stoked, he's so stagnant He knows, when he goes back to this broken code, that's when it's Back to the pad again, yo this old game series Better go capture this moment and hope it don't pass him...
@bongoz8160
@bongoz8160 11 ай бұрын
waitforchild can sound really wrong if its not specified to be about programming 😭
@jso1
@jso1 11 ай бұрын
"GetChildren" 😂😂
@ZylithDev
@ZylithDev 11 ай бұрын
ClearAllChildren()
@XaneMyers
@XaneMyers 11 ай бұрын
Instance.ChildRemoved:Wait() ​@@ZylithDev That reminds me of how censored Roblox's method's name is. In GZDoom (Doom source port), there's a DECORATE function named “A_KillChildren”.
@CrazyDoodEpicLeaves
@CrazyDoodEpicLeaves 11 ай бұрын
FindFirstChild
@boblox_studio_dev
@boblox_studio_dev 11 ай бұрын
@@SpinnySpiwal let me see
@wheatwhole_
@wheatwhole_ 9 ай бұрын
your server replication explanation made multiplayer games very easy to understand
@bryaaaaaaaan
@bryaaaaaaaan 11 ай бұрын
Steven Hawking definitely used Waitforchild()
@crusherfire1
@crusherfire1 11 ай бұрын
💀
@pigcultleader
@pigcultleader 10 ай бұрын
if age
@retrobloxy32
@retrobloxy32 8 ай бұрын
Who tf is Steven hawking bro is he another developper
@MTurtle
@MTurtle 8 ай бұрын
@@retrobloxy32 lmfao
@trinitrotoluene3D
@trinitrotoluene3D 8 ай бұрын
@@retrobloxy32 are you for real
@SpiralAPI
@SpiralAPI 11 ай бұрын
bro gave a better explanation of replication in a video about WaitForChild than most videos which entire purpose is explaining replication
@Noober_0
@Noober_0 4 ай бұрын
I finally have a quick video to explain for me instead of explaining it myself and sounding like im yapping ❤️
@cupdoesvideos5853
@cupdoesvideos5853 11 ай бұрын
I know someone who has waitforchilditis. This video was very informative for helping me cure them
@crusherfire1
@crusherfire1 11 ай бұрын
It's truly a terrible disease 😔
@TheDevelopmentHive
@TheDevelopmentHive 11 ай бұрын
​@@crusherfire1 I had waitforchilditis. Thank you for this cure!
@Monkeymario.
@Monkeymario. 4 ай бұрын
@@TheDevelopmentHivei had waitforchilditis but i recovered before i watched this video
@ItsHunderr
@ItsHunderr 9 ай бұрын
everytime i script, i think about this: we don't wait for child, we find the childs
@timebmber
@timebmber 4 ай бұрын
so that means we FindFirstChildWhichIsA(Dumbass)
@thistaken5550
@thistaken5550 24 күн бұрын
childs 💀
@ItsHunderr
@ItsHunderr 24 күн бұрын
@thistaken5550 😭 relax, its the other meaning
@thistaken5550
@thistaken5550 24 күн бұрын
@@ItsHunderrwhat... no i mean its "children"
@JavonDevv9000
@JavonDevv9000 10 ай бұрын
this is why when you get to the end of an obby game and use those fly paths no one else can see it
@MatchaFlavoredTea
@MatchaFlavoredTea 9 ай бұрын
Fun fact, fly paths have been in ROBLOX for over a decade. A lot of the tools were coded before server-client filtering was put in place. Back then, clients could do nearly whatever they wanted which was a huge security issue, including spawning bricks replicated to other players.
@bruv4179
@bruv4179 8 ай бұрын
@@MatchaFlavoredTea woah that's really interesting, thanks for the fact
@NewPuncher
@NewPuncher 4 ай бұрын
me when I lie
@Jonskipvp
@Jonskipvp 4 ай бұрын
​@@NewPuncher fr
@yourmomscott
@yourmomscott Ай бұрын
i dont think thats how that works
@Monkeymario.
@Monkeymario. 4 ай бұрын
3:07 fun fact on older versions of ROBLOX the client used to be able to replicate to the server but due to exploiters the client can now only replicate their avatar and nearby unanchored parts but nothing else
@RANERBLOOPERS
@RANERBLOOPERS 4 ай бұрын
this was due to filtering disabled still existing allowing users to replicate the stuff from server to every client
@MatteoP04ita
@MatteoP04ita 10 ай бұрын
Astonishing video. I'm going to remove all "WaitForChild" from my scripts right now
@fusion.studioX
@fusion.studioX Ай бұрын
Client-Sided Scripts: "Part is not a valid member of Workspace"
@TheOVRD
@TheOVRD 11 ай бұрын
WaitForChild() sounds exactly like something an adult roblox player would use and abuse in their life.....
@Matute44523
@Matute44523 3 ай бұрын
FindFirstChild() sounds more like that
@Bulderme
@Bulderme 2 ай бұрын
GetChildren() seems more accurate
@MarzFromMars
@MarzFromMars 8 ай бұрын
thanks bro this is gonna cure my WaitForChilditis
@brawldude2656
@brawldude2656 4 ай бұрын
This was the problem for me. It is hard to find in what order exactly these local and server sided stuff are loading in. Thank you for making this video
@Ghillis_Peyton
@Ghillis_Peyton 10 ай бұрын
now i gotta go back to all my scripts and fix this lol. Great video!
@RealDavidStuff
@RealDavidStuff 11 ай бұрын
This is a well-made video, explaining extremelly well the use of :WaitForChild(). This was definitely worth the 17 minutes. This particularly helped me to fix an error on my script that i did not know how to fix. Good job man, keep going!
@lazypezt810
@lazypezt810 10 ай бұрын
Unironically a banger explanation I will go home and fix some parts of my script now Also i genuinely learned much more about replication on this video than anything else lmao
@baconheadhair6938
@baconheadhair6938 5 ай бұрын
0:47 Everytime i dont put waitforchilds in every line, my code works in studio but breaks in actual games
@SaleMales
@SaleMales 4 ай бұрын
Don't know about server (Server don't need these) But in client it is probably loading smh faster or have things pre-loaded
@tact310
@tact310 10 ай бұрын
This is one of many times where I'm actually ashamed of myself after watching a video 😅 I have been using waitforchild method in pretty much all of my variables in my local scripts, trying to access stuff that is already loaded in the client like you mentioned. I genuinely didnt like using waitforchild everytime whenever I want to access an instance but I felt it was necessary. After this video I'll definitely have to go on rehab and stop using waitforchild haha... Good video!
@crusherfire1
@crusherfire1 10 ай бұрын
Your WaitForChilditis has been cured!
@Bemmu
@Bemmu 2 ай бұрын
Another topic I'd watch a video on would be when are things actually loaded into memory. For example, faraway part has a texture on it: is consuming memory? ReplicatedStorage part texture? Gui texture but .Visible = false. etc etc there are many cases where it's unclear what needs to be preloaded because it isn't loaded when you think it would be, or on the other hand cases where something is loaded that you wouldn't want to be and is just wasting memory.
@3mperorexe
@3mperorexe 5 ай бұрын
Hi just wanted to say thank you! Me and my friends are learning lua rn and this video will hopefully help us from making a bunch of mistakes!
@Hyllested_
@Hyllested_ 11 ай бұрын
A great example of when you should use WaitForChild that you kind of missed is character loading.
@crusherfire1
@crusherfire1 11 ай бұрын
That would fall into the category of instances created during runtime, so yes, use WaitForChild!
@XaneMyers
@XaneMyers 11 ай бұрын
​@@crusherfire1Well, for this, either WaitForChild() or Player.CharacterAdded:Wait() works.
@crusherfire1
@crusherfire1 11 ай бұрын
@@XaneMyers Yes, and also if you needed to access any descendants of the character, make sure to use WaitForChild!
@XaneMyers
@XaneMyers 11 ай бұрын
@@crusherfire1 Player characters are tricky to reference and access, so I use my own module to store all of my character instance references. (I do use WaitForChild() while getting them, though.)
@shinyindividual12
@shinyindividual12 10 ай бұрын
local character = player.Character or player.CharactedAdded:Wait()
@squify7226
@squify7226 11 ай бұрын
EXACTLY! I didn't use waitforchild unless it would break when I didn't use it because it wouldn't load, or when I needed to use it, I was always confused why people spam waitforchild like every line of code
@Im557
@Im557 10 ай бұрын
wait why are you being confused over how someone else codes?
@squify7226
@squify7226 10 ай бұрын
because waitforchild is not supposed to be used every time, only in certain instances, so i was confused why everyone just spammed it every line of code instead of writing code how its intended to be written and save time@@Im557
@FloxyCola
@FloxyCola 5 ай бұрын
@@Im557 Confused over the unnecessary use of the :WaitForChild() function. And it isn't "how someone else codes", it's completely useless, and a waste of time to write.
@Im557
@Im557 5 ай бұрын
@@FloxyCola this was 4 months ago
@FloxyCola
@FloxyCola 5 ай бұрын
@@Im557 And I just found the video :)
@y0y55
@y0y55 3 ай бұрын
I like that at random moments you start to sound like squidward
@Yuicloud
@Yuicloud 9 ай бұрын
Pretty sure you can do Repeat wait() until game:isloaded(); as well instead of waitforchild
@crusherfire1
@crusherfire1 9 ай бұрын
That would be unnecessary polling of a condition when you can listen to an event instead (game.Loaded)! Also, wait() is deprecated and task.wait() should be used for new work!
@Yuicloud
@Yuicloud 8 ай бұрын
​@@crusherfire1 Yeah, I forgot about task.wait(), you can use task event as well. But Repeat task.wait() until game:isloaded(), will still make the job done and it's minor computational resources even if it isn't the best practice it's still somewhat reliable.
@Monkeymario.
@Monkeymario. 4 ай бұрын
1:46 a better way to illustrate this would be to show a computer instead of their face
@6t-11
@6t-11 Ай бұрын
Did not know this was how network ownership worked - thanks! 3:44
@sowmyam6176
@sowmyam6176 8 ай бұрын
This helped alot! Also i'm sure :WaitForChild() can also be used in hetting the player's character as unlike many who use *_player.Character or player.CharacterAdded:Wait()_* Some use *_Workspace:WaitForChild(player.Name)_* right?
@Secrethack_
@Secrethack_ 7 ай бұрын
Not the best option as there might be another object in the workspace with the same name as the player.
@SaleMales
@SaleMales 4 ай бұрын
@@Secrethack_ that's why character added exists tho You can also put players in folder (It requires character added too)
@Spelo1
@Spelo1 4 ай бұрын
​@@SaleMalesI don't think they were against characteradded tho
@myriadtechrepair1191
@myriadtechrepair1191 8 ай бұрын
Wait so this is why the game freaks out when, say, multiple people are sitting on a moving physics object?
@_k.
@_k. 11 ай бұрын
7:00 This part is wrong. (edit: no im wrong, at some point they changed things) Quote from the PlayerGui page in the roblox documentation: "When the player's Player.Character spawns for the first time all of the contents of StarterGui are automatically copied into the player's PlayerGui." And since its cloned by the server, you need to make sure it's replicated. A workaround is to not use startergui at all and clone stuff to playergui through a local script
@crusherfire1
@crusherfire1 11 ай бұрын
Nope. Please go ahead and test it yourself, I already have. If you have a local script inside of the Gui in StarterGui, you do not need to wait for the replication of the descendants. If you have a local script outside of StarterGui trying to grab the GUI, you only need to wait for the GUI itself to be cloned into the PlayerGui folder. However, you do not need to wait for the descendants. I have dozens of local scripts for GUIs not even located in StarterGui and I only need to wait for the GUI itself, there is no need to use WaitForChild on any descendants of the GUI. This is probably specialized behavior only for the StarterGui container.
@_k.
@_k. 11 ай бұрын
@@crusherfire1 tried it, you're right. but this doesn't even make sense with what you're saying at 5:49, the gui is cloned by the server at runtime right? or is there just an exception for this cloning to work differently? i swear it wasn't always like this
@crusherfire1
@crusherfire1 11 ай бұрын
@@_k. Yes, the GUI is cloned by the server. You can prove that by listening to the ChildAdded event on both the client and server for the PlayerGui folder, and you will see it is added on the server first and then the client. Now cloning is a synchronous operation, so it would make sense for all of the descendants to be made available (if cloning an object on local script to be accessed by another local script or server script to be accessed by another server script). But with the StarterGui service, the behavior is a little more interesting since it being cloned by the server yet we don't need to wait for the descendants of the GUI. There must be some kind of special behavior going on behind the scenes that isn't well documented. However, I guess this would make sense because in the past you would actually have to use WaitForChild when accessing the PlayerGui folder since it was created by the server, but Roblox did something internally where you don't have to use WaitForChild. Another developer did some tests and also confirmed that you don't need to use WaitForChild. devforum.roblox.com/t/local-script-under-s%D1%81reengui-runs-only-after-all-gui-descendants-are-fully-replicated-to-playergui/2510092
@_k.
@_k. 11 ай бұрын
@@crusherfire1 alright, thank you!
@_k.
@_k. 11 ай бұрын
they really made waitforchild unnecessary for gui at some point between july and august without telling anyone...
@Monkeymario.
@Monkeymario. 4 ай бұрын
3:35 and most importantly permission to move your ROBLOX avatar
@vfisha
@vfisha 11 ай бұрын
that random model of parts looks cool you should leave it in the description
@crusherfire1
@crusherfire1 11 ай бұрын
You can make it yourself via the command line! Just create 500-1000 parts, color them randomly, size them randomly, and then position them randomly.
@Bulderme
@Bulderme 2 ай бұрын
I do admit that I have a WaitForChild() problem. I need to fix myself and recover some memory lol
@shadowstorm202
@shadowstorm202 10 ай бұрын
the poblem of FindFirstChild is when the instance load after the script of FindFirstChild and it don't find it
@Wannabe-channeL
@Wannabe-channeL 11 ай бұрын
I only used it when that object can exist only one and never be deleted, mostly at the top of the script when I need a reference of something.
@Monkeymario.
@Monkeymario. 4 ай бұрын
6:59 STOP DONT USE WAITFORCHILD
@Kryst0v
@Kryst0v 11 ай бұрын
Roblox studio is basically the engine made for these who tired Unreal but got traumatized from the struggle to set up a simple dedicated server
@crusherfire1
@crusherfire1 11 ай бұрын
probably
@f-149
@f-149 10 ай бұрын
facts
@noobiza
@noobiza 4 ай бұрын
My Dad had in his programing :WaitForChild(Never).
@deoverseers
@deoverseers 10 ай бұрын
I use ".", but if an object is added, I use waitforchild, or I use findfirstchild when eoblox messes up and guves me a random error when the object CLEARLY IS A MEMBER
@FreyzS
@FreyzS 11 ай бұрын
are you using theme? how to make my roblox studio look like yours?
@crusherfire1
@crusherfire1 11 ай бұрын
It's just modifications to some script editor settings in Studio. There is a plugin you can grab that has several presets available to choose from: create.roblox.com/store/asset/3617323299/
@FreyzS
@FreyzS 11 ай бұрын
@@crusherfire1 thank you
@exentric753
@exentric753 9 ай бұрын
Missed opportunity to say "WaitFor Child Abuse"
@Jaypiasco
@Jaypiasco 11 ай бұрын
ogod I feel called out sm, please hab mercy for i have sin of WaitForChild misuse
@Miketheike123
@Miketheike123 2 ай бұрын
grammar=trash
@goldencommenter
@goldencommenter 4 ай бұрын
dads spam that in their code 😂😂😂
@amooingdog3297
@amooingdog3297 4 ай бұрын
They can't WaitForChild to grow up
@Real_Potato_Man
@Real_Potato_Man 7 ай бұрын
Simple solution: just don't wait for the child
@sleekpastry
@sleekpastry 4 ай бұрын
You can't stop me
@DimoDimoo
@DimoDimoo 9 ай бұрын
How about for GUIs? Like if you place your GUI scrips inside somewhere else like StarterPlayerScripts
@crusherfire1
@crusherfire1 9 ай бұрын
You would need to use WaitForChild on GUIs being cloned to the player's PlayerGui folder in scripts that are outside of that particular GUI. Fortunately, however, you do not need to use WaitForChild on any of the GUIs descendants!
@DimoDimoo
@DimoDimoo 9 ай бұрын
@@crusherfire1 So like, I just need to do a WaitForChild for each of the ScreenGUIs under PlayerGUI? Thank you, this video is incredibly helpful!
@usernamehere_
@usernamehere_ 4 ай бұрын
I’m gonna guess before I even watch this is that WaitForChild shouldn’t be chained.
@teaoplayinggames
@teaoplayinggames 4 ай бұрын
we aint waiting for any child
@ilovemywhiteshoes
@ilovemywhiteshoes 4 ай бұрын
why did this show up in my recommended thing?????
@Mr.Smiler1
@Mr.Smiler1 11 ай бұрын
when scripters need to wait for a child comes out from school:
@blingbongbong
@blingbongbong 2 ай бұрын
what about getService? why don't we just index things from game?
@YHK_YT
@YHK_YT 9 ай бұрын
12:41 with the recent audio api update I’ve ram into issues wiring stuff since the script is running before everything loads, if I use a waitforchild on for example a parent of an object but that object has children it’ll still give me an error since the child didn’t load yet, I’m confused as to how yours isn’t the same since you mentioned the script only runs after everything loads?
@crusherfire1
@crusherfire1 9 ай бұрын
Are your instances in the workspace? If you have streaming enabled + items in the workspace, you'll have to use WaitForChild, otherwise, you won't need to if streaming is disabled.
@Winter-Moons-was-taken
@Winter-Moons-was-taken 3 ай бұрын
Very informative, thank you.
@kirixltsver
@kirixltsver 10 ай бұрын
A "Child" is basically a object. For those who think its weird to call a Function in a Programming Language like that. But what about "Parent" which is a Folder...
@voxj.
@voxj. 2 ай бұрын
i won't wait for child
@Flairex
@Flairex 7 ай бұрын
Let me just whip out my notebook
@Kart
@Kart 11 ай бұрын
thanks i have never not used wait for child ever and now i might not use it as much maybe
@Laqota
@Laqota 10 ай бұрын
Here's an easier way to explain it. Look at it as the Server and the client. The server has to send information to the client, our internet isn't godspeed, so it has to take time receiving this information. Which we call Ping. Milliseconds it took to receive the information. Same for the Server. If you're on the client waiting for a part being created by the server by sending you packets of data, you want to use WaitForChild to wait for that part to exist.
@FloxyCola
@FloxyCola 5 ай бұрын
Did he not basically say that in the video?
@SaleMales
@SaleMales 4 ай бұрын
Even better is (probably, not absolutely sure, kind same thing you said) Probably better cuz easier to understand sometimes Server have already loaded in, the reason you need to use WaitForChild at server-side only if you sure that this thing won't exist (meaning it will not be there from start of game) when that code is launched At client (player) you have to use WaitForChild since we don't have anything loaded in and have to load that in, and if this haven't loaded when some part of code is launched which using Instance, it will cause error, thats why you use WaitForChild But ofc at client you can pre-load things like GUI's by putting them in ReplicatedStorage and using game:IsLoaded() and game.Loaded:Wait() (As I remember), and then for that gui you don't have to use WaitForChild at it anymore (Probably, I don't use this anyway)
@canyouhelpmehuh411
@canyouhelpmehuh411 3 ай бұрын
Nice
@bmfnatedogg
@bmfnatedogg 11 ай бұрын
to be honest the only time i acctually used it was when a item you had to pick up would just kill the user getting it so i just made a script for the player that waits for the child to hold it then enabled its scripts
@jasonsgone
@jasonsgone 10 ай бұрын
im sad that this is all basic knowledge to me but i still suck at scripting
@tomato.mp4
@tomato.mp4 4 ай бұрын
lazy method: just never use waitforchild until it errors
@Nexoloft
@Nexoloft 3 ай бұрын
I don’t waitforchild when I drive
@selo_the_great
@selo_the_great 11 ай бұрын
Hey, i have a question. So i got a bit confused for the part about using WaitForChild for screen guis descendants (timestamp: 6:56) because even offical templates and other free resources made by roblox use WaitForChild to wait for ScreenGuis descendants which made me a bit confused. Are you completely certain that direct indexing like that for gui descendants is failproof and will never fail or is the people at roblox forgot that they don't need to do that?
@crusherfire1
@crusherfire1 11 ай бұрын
"people at roblox forgot that they don't need to do that?" A lot of Roblox scripts are outdated. Many still use the legacy wait(), spawn(), and delay() functions. You can test it yourself, and as confirmed by another developer, devforum.roblox.com/t/local-script-under-s%D1%81reengui-runs-only-after-all-gui-descendants-are-fully-replicated-to-playergui/2510092 you do not need to use WaitForChild() on GUI descendants that are copied over from the StarterPack. I have dozens of GUIs in my projects and I don't ever use WaitForChild() for any of the descendants. I don't get any errors, ever.
@selo_the_great
@selo_the_great 11 ай бұрын
@@crusherfire1 thanks for the clarification, i tested it and it works perfectly! although the new updated "Racing" template code which was released on the 23th of January (like 4 days ago) STILL uses waitforchild for descendants of the screen gui and they even put this comment above the code, this is the code snippet i am talking about: -- RaceGui gets automatically cloned from StarterGui and may not be fully replicated when this script runs. -- Use WaitForChild to wait for the necessary instances to replicate. local raceGui = playerGui:WaitForChild("RaceGui") local uiScale = raceGui:WaitForChild("UIScale") local countdownLabel = raceGui:WaitForChild("CountdownLabel") local finishFrame = raceGui:WaitForChild("FinishFrame") this is very recent so i guess they did forget they don't need to do this...
@埊
@埊 10 ай бұрын
Me who uses the WaitForKing() variable instead as it is more powerful:
@m3s5_0f_numb3r5
@m3s5_0f_numb3r5 10 ай бұрын
Learned a lot from this video, and none of it had to do with WaitForChild() 😂 But no really lots of small stuff I didn’t know about. Good video. 👍
@Azralik0_0
@Azralik0_0 11 ай бұрын
i am yuri, i also wait for child outside playground so i can take them home.
@crusherfire1
@crusherfire1 11 ай бұрын
🤨
@justwave3407
@justwave3407 11 ай бұрын
i never knew i had waitforchilditis, but after seeing this i got cured
@ครูไชยวิทย์
@ครูไชยวิทย์ 10 ай бұрын
Why
@devandyEsp
@devandyEsp 7 ай бұрын
It looks ugly if you use them unnecessarily
@AmCheez
@AmCheez 4 ай бұрын
Hey, I have the exact opposite problem where I don’t use it at all… Do you have a video that cures that?
@aGuyWhoWantsToSudyIGuessEGYbtw
@aGuyWhoWantsToSudyIGuessEGYbtw 10 ай бұрын
Amazing Tutorials Thx For The Help
@aarneon24
@aarneon24 11 ай бұрын
so I will just abandon my child?
@vlogsquad7113
@vlogsquad7113 4 ай бұрын
Could you cover the difference between findfirstchild and waitforchild
@Kagedaze
@Kagedaze 10 ай бұрын
as a man who likes waiting for children and the touched event, I found this video extremely helpful.
@aienthusiast618
@aienthusiast618 5 ай бұрын
me too
@PumpyGT
@PumpyGT 4 ай бұрын
Excuse me
@Necrozatus
@Necrozatus 10 ай бұрын
I've never used waitforchild bro and it always breaks when i use it cuz idk it times out i think
@FloxyCola
@FloxyCola 5 ай бұрын
You either didn't use the right file path, or you're waiting for something that doesn't exist.
@BodenPflanze
@BodenPflanze 4 ай бұрын
How did you do the split screen with both Client and server view. I usally switch between them (when im working on client scripts) which is kinda annoying
@goodplayer7048
@goodplayer7048 9 ай бұрын
Did you guys really spend 17 mins watching THIS?
@crusherfire1
@crusherfire1 9 ай бұрын
yes
@handsomesponge9952
@handsomesponge9952 4 ай бұрын
Bruh i just do it without wait/findfirstchild if im absolutely sure that the child im searching for is there. (Assuming another script doesnt add it/its sımething like armour and waitforchild is necessary.. or not)
@skcarti
@skcarti 4 ай бұрын
can you make a video about your script editor? whats the font ur using?
@defenestratorr
@defenestratorr 11 ай бұрын
So do we even need to use it at all, ignoring streamingenabled? Time to rewrite 90% of my large scale game's code 😭
@crusherfire1
@crusherfire1 11 ай бұрын
You only need to use it for instances created during runtime. If you do not have streaming enabled, then you don't even need to use WaitForChild on the static instances in the workspace. (Static meaning instances downloaded from the snapshot when a player joins the game). Any dynamic instances (instances created or destroyed during runtime) should be handled with more care.
@dhruv6489
@dhruv6489 11 ай бұрын
but whats the problem even if you use waitforchild, i dont think there any implications to use it right
@crusherfire1
@crusherfire1 11 ай бұрын
Well first off, chaining a whole bunch of WaitForChild function calls takes much longer to type than directly indexing. Secondly, it makes your code harder to read. Thirdly, WaitForChild shouldn't be used when you don't need to wait for a child, it's a gross misuse of the function. If you want to save time typing (which is a big deal when programming) and you know you don't need to use WaitForChild, then don't use it lol
@jso1
@jso1 11 ай бұрын
so it doesnt affect performance? ​@@crusherfire1
@commury
@commury 10 ай бұрын
guys can i use it for loading screen??? Im making a team game but when i tried to set the spawn location to red, its right in the workspace but it didnt work when playing. I looked for it in the explorer but it really isnt there, i guess its the graphic setting.
@WindyPivot
@WindyPivot 9 ай бұрын
are you going to continue doing things like this? cuz u got a new sub fr
@wondering6583
@wondering6583 4 ай бұрын
How do you seasoned a Roblox developer?
@linuskat6446
@linuskat6446 11 ай бұрын
Don't use wait() use the task library instead which has task.wait()
@crusherfire1
@crusherfire1 11 ай бұрын
Of course. The code that had the wait() in it was written before the task library was released.
@liqznaa
@liqznaa 11 ай бұрын
apparently it ruins something, i think performance? but thats what ive heard on devforum + im not a scripter@@wwa-du7jw
@a_username_lol
@a_username_lol 10 ай бұрын
@@wwa-du7jw wait has weird delays if u have low fps i think but im not sure
@Guest75899O
@Guest75899O 9 ай бұрын
i keep making waitforchild chains lol
@sifenus
@sifenus 11 ай бұрын
Thank you for this video, really informative!
@glexix1151
@glexix1151 4 ай бұрын
Thank you! That was helpful
@certifiedyapperandrapper
@certifiedyapperandrapper 8 ай бұрын
Idk how to script much so i have chatgpt to give me some luascript and basically just copy and Pasting it Idk if it actually gives the correct script cuz it just does nothing
@FloxyCola
@FloxyCola 5 ай бұрын
ChatGPT can sometimes give you outdated functions, like "wait()" and "spawn()", and sometimes even deprecated functions. In simple terms, you don't want those in your scripts. I'd recommend actually learning how to script.
@valurimist9861
@valurimist9861 5 ай бұрын
@@FloxyCola It also is just plainly unreliable. Try debugging with chatGPT its hillarious. You'll give it obviously broken code but its only critique will be your variable naming conventions 😂
@YTStop1
@YTStop1 10 ай бұрын
Guys, let's WaitForChild() !! (take it in a different context)
@PellerN64
@PellerN64 11 ай бұрын
i cant believe all these months ive been doing it wrong
@CripsyFries
@CripsyFries 4 ай бұрын
me:WaitForChild("Brain")
@execute214
@execute214 11 ай бұрын
the wait for child chain
@ballticker69420
@ballticker69420 11 ай бұрын
great video, but im going to continue misusing it
@crusherfire1
@crusherfire1 11 ай бұрын
🤨
@mrstarfish
@mrstarfish 10 ай бұрын
I have a question: When using .ChildAdded/.DescendantAdded is it safe to assume everything is replicated and there’s no need for WaitForChild? Nvm he answered it already in the vid
@mrstarfish
@mrstarfish 10 ай бұрын
Nvm I asked the question right before he answered it 🤦‍♂️
@Fort-Nate
@Fort-Nate 8 ай бұрын
Do I need to use WaitForChild when cloning a gui item?
@THEREDXREAL
@THEREDXREAL 4 ай бұрын
Im waiting for my child
@Proxiw
@Proxiw 11 ай бұрын
i agree that developers should stop misusing their child()
@bigboy8285
@bigboy8285 11 ай бұрын
indeed, go get the milk instead.
the COOLEST game feature YOU'RE NOT USING!
7:41
Crusherfire
Рет қаралды 46 М.
MULTI-THREADING on ROBLOX?!
33:13
Crusherfire
Рет қаралды 16 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
I Made a Fake Warning to Scare Roblox Players
16:31
ByteBlox
Рет қаралды 1,9 МЛН
I Updated my Roblox Game in 1 Week!
16:51
SamRoblox
Рет қаралды 572 М.
Roblox WEAK tables & how to use them
23:30
Crusherfire
Рет қаралды 8 М.
Classic Roblox RPG | Devlog #5 - BIG UPDATE!
7:18
galaxhex
Рет қаралды 13 М.
The Farlands But in ROBLOX
10:46
Crusherfire
Рет қаралды 148 М.
I Made a Roblox Obby That's Secretly a Horror Game
4:48
Pluto
Рет қаралды 2 МЛН
you SUCK at organizing scripts... Let's fix that!
13:12
Crusherfire
Рет қаралды 23 М.
Roblox Module Scripts (The Right Way)
15:20
qweekertom
Рет қаралды 25 М.
Can I Make a VIRAL Roblox Game in 1 Hour?
15:16
Temprist
Рет қаралды 6 МЛН
I spent 500 DAYS Building My Roblox Game!
14:21
DeHapy
Рет қаралды 1,3 МЛН