What is the benefit of:
Instance:FindFirstChild("childName")
vs
Instance.childName
?
I assume that if childName is not a child, the first will return nil while the other will throw an error?
Instance.childname
will cause a fatal script error if the child does not exist.
Instance:FindFirstChild("childname")
will only return nil rather than breaking. Here's an example of the use:
if workspace:FindFirstChild("TestPart") then print("part exists!") else print("part does not exist...") end
If you merely used the former, this script would not work.