:WaitForChild() not working

I was making a script and found you cant do:

Instance:WaitForChild([instance])

is there a work around for this?

It’s simple. You don’t need square brackets for that.

I wouldn’t add the brackets if I didn’t need them

Oh, if those are instances, you don’t need to use WaitForChild, if values are reference to instances. I thought that values were strings and not instances.

When I don’t use :WaitForChild() an error pops up saying " Example is not a valid member of Folder “ServerStorage.Pets”, I thought this was because it didn’t load in and needed to use :WaitForChild()

[ index ] is to get a value from a table / instance

What does profile.Data.Invintory contain anyways?

1 Like

I just realized the script was trying to clone models it already had in the array profile.Data.Inventory :pensive: I’m sorry

1 Like

looking back on this I realize you were right

1 Like