These past years i’ve been using WaitForChild on the server because i kept thinking about the situation where “the child hasn’t loaded yet”, but im starting to think i shouldn’t worry about it, because the server basically holds all the data already, and it’s the clients job to load all of them, right?
I really don’t know. I want confirmation or more insight on this, because i don’t want to be using WaitForChild for no reason. Thanks.
Think of it like this.
Some Roblox services require time to load, because they’re obviously owned by Roblox, and it most likely uses Roblox’s API, which is why things like ChatService are pre-setup by other users, meaning that it’s not setup through gameplay, but setup in studio, so that in gameplay it could be customized. However not all people do this, many people access ChatService through ServerScriptService(the place where it goes once it’s loaded), which would be accessed through gameplay.
If you use WaitForChild, that tells me that you did not pre-setup anything, but rather access it through gameplay. I use FindFirstChild first, then WaitForChild incase if it’s not there.
A Server does have all the data, but what if the data wasn’t initialized first? that same Server would be wasting it’s own resources by letting scripts run forever, which basically explains what all the Roblox games do.
Use FindFirstChild instead in server scripts. WaitForChild is for something that has never existed on start. i.e. Player DataStore getting cloned to the player on join.