Getting Descendants seem to be limited somehow

As you can see the :GetDescendants() isn’t getting all the descendants of the folder and I don’t understand why. What am I missing?

I called the module and it’s printing correctly so I’m pretty sure it’s called correctly as well. But in the off chance I am wrong here is that script also.

print("isClient")
local AnimMod = require(script.AnimationsModule)

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

repeat task.wait() until player and character --wasn't getting one or the other without this line fsr

print("Player and Character loaded")
AnimMod.InitializeTween()

Do you have streaming enabled on?

It’s likely that the objects are simply not loaded, and hence not detected by the client. This can be caused by trying to access them too soon after the player joins (you can use :WaitForChild for one of the items there to try and prevent it) or you have streaming enabled on, and the player isn’t close enough to the object to have it loaded.

Well, I did wait until the character was loaded in. The folder is in the workspace, I assume it’s loaded faster than the clients’ character. I can’t really look further as the parts in that folder will be cloned in as needed. What do you suggest?

Keep your current code, but after the for loop (or before, shouldn’t affect too much), hook up a connection to DescendantAdded, and make it run the same code as is being run in the loop for anything new added

I think I worked it out. The module can only take the parameters I send it. Therefore I am sending it the whole array from the client. This seemed to work as I got back the array and the name of the plane “Plane”.

EDIT: The tweens work now.

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