I'm curious, what are the difference between FindFirstChild and WaitForChild?
Easy.
FindFirstChild
gives out a string value ("value"), if the selected child exists, or nil if no such child exists.
Example
local something = script.Parent:FindFirstChild("ChildName") print(something) --if a child with the given name exists, it will print it's name. Else, it will print nil.
Before we continue to WaitForChild, I have to say a thing. FindFirstChild has a bool property. If you do not type it, it will be false by deflaut. IF true, it will search for every descendant.
local something = script.Parent:FindFirstChild("ChildName", true) print(something) --if a descendant with the given name exists, it will print it's name. Else, it will print nil. --if the hierarchy is like this (script.Parent.ChildNameA.Dakiy.ChildName), and bool recursive is true, it will print the child name and not nil. If false, it will just print the child name if the hierarchy is like that (script.Parent.ChildName), else it will print nil
WaitForChild
does the same, but, if no child detected, it will wait until a child with the given name appears. And it has not the bool recursive
local something = script.Parent:WaitForChild("ChildName") print(something) --Basicly, it will never print nil, because if no child with the correct name, the function will yield until a child with the given name appears. Then, it will print it's name.