Example, you need to require a module script, and you need to check if it’s actually there. Would you use :WaitForChild() or just use :FindFirstChild() and use an if statement?
Because I’ve tried using :FindFirstChild() and if statements but it just looks awful.
I would rather have them created in ReplicatedStorage rather than have a script create each individual one. Although, I’m not sure about the performance differences.
You can always make your own functions if you feel like it looks cleaner.
local function waitFor(parent, ...)
for i = 1, select("#", ...) do
parent = parent:WaitForChild((select(i, ...)))
end
return parent
end
local Animator = waitFor(character, "Humanoid", "Animator")