Which should I use? FindFirstChild or WaitForChild with a small timeout?

Let’s say I instance a new part into a model in one script and reference it from another. If I at one point wanted to have it referenced within a very short amount of time (around half a second), should I then use FindFirstChild on that model to get the part or use WaitForChild with a very small small timeout?

Both of those are for named lookups. Use FindFirstChild when you know it will exist or use WaitForChild to yield until it exists.

CollectionService might better handle your situation.

1 Like

if the code runs before the part is added then WaitForChild
if the code runs after the part is added then FindFirstChild

you could always see if a part was added using a ChildAdded function