:GetChildren() returning empty table?

Nope, still have the same issue.

1 Like

Can you print GetChildren for another instance in your workplace, does that return {} as well, or does it print the Children?

1 Like
print(game.Workspace.Textures:GetChildren())

Returned
image

Hm, okay. Stupid idea, can you re-create the CamParts folder, drag the 3 parts into the new one and delete the old CamParts Folder, make sure no spaces etc.

It’s a really stupid idea but I’m not sure at this point.

1 Like

Did this, still not working though.

1 Like

Hm. Okay, You could try GetDescendants, does the same thing but idk worth a shot.

Secondly, load into your game if GetDescendants isn’t working, check what the client can see, can it see all 3 of those parts client side inside of the CamParts folder, or are they gone?

1 Like

Tried :GetDecendants(), same issue.

The client can see all of the parts.

1 Like

Hm, alright.

repeat task.wait() until #game.Workspace.CamParts:GetChildren() == 3

Can you try putting this at the very top of your script? Let me know the outcome on it.

2 Likes

Alright, this works, however, this only works if there are 3 parts in the folder, how do I apply it so that it will load however many parts there are.

1 Like

Ran into another error, if I run the setCam function a second time, it has the same error again.

1 Like

You could just do > 1 instead of == 3, they shouldve all loaded by that time.

1 Like

Hm, okay, I know this may be a pain, try putting

local camParts = game.Workspace:WaitForChild("CamParts")

into your setCam function,

1 Like

Following this, if there is a minimum you want it to wait for, maybe put it to like >= 3 instead of == 3 so it requires at least 3 parts to be loaded.

1 Like

Everything works, but doing > 1 means that only 2 parts load for whatever reason. So I am going to be forced with updating it everytime I add something new. Thankyou for all your help.

1 Like

This is the weirdest bug I have every experienced. I also had the same issue with ChildAdded on another folder in a different game. Is it a studio bug?

1 Like

You must have another script somewhere that you forget that’s messing with these parts or something. It’s very weird.

I’m not sure, it might be, I haven’t personally ran into any bugs like this myself

1 Like

I can assure you that there is not.

1 Like

Then it’s very very weird, maybe we’re both missing something so simple, but at least you have it working right now, it can be something to figure out at a later date.

1 Like

I am experiencing the same issue while also trying to make a camera system, I have a camera folder and camera parts. I’m hoping a proper solution can be found since the current solution doesn’t feel right.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.