I am trying to make my Stand invisible using :GetDescendants(), however when I run a for loop within my Stand, it prints out no BaseParts.
LocalScript:
Inside the Stand model:
What it outputs:
Finding individual BaseParts using :WaitForChild() gives a result, its just that when I use :GetDescendants() it acts like no BaseParts exist inside the Stand, even if there are.
Is char an NPC or Dummy, and if so, is it far away?
Try setting Workspace.StreamingEnabled to false and see if it fixes the issue. If it does, that means the issue is streaming. Generally, you want to keep StreamingEnabled on, so we’ll work together to find a better solution. If that’s not the issue, then we can keep searching for more explanations.
Have you got streaming enabled? If so:
In the model, change the ModelStreamingMode to Atomic.
Then, in the script, add standFolder:WaitForChild("Head") (you don’t need to assign this to a variable) prior to the loop
Streaming Enabled can cause things to load in at different times, and the script may run before everything is loaded (and causing the baseparts not to be found).
Changing the model to atomic means that everything in the model will load in (and load out) at the exact same time. Based on this, the `standFolder:WaitForChild(“Head”) line waits until an element (in this case “Head”) has loaded in the model, indicating the rest are loaded as well.
Then when you run the loop, the parts are all loaded and you correctly find them all