Hello! I am relaying information about a bug our scripter has come across since they cannot post on the devforums yet. Any help is greatly appreciated!
The issue started when we added a significant amount of player model accessories to our game. The accessories can all be added normally in the editor and the player can spawn in. The issue occurs when trying to load a player’s saved model with any accessory on it. The code in question:
for AccType, Values in pairs(dataTable["accessories"]) do
local sampleAcc = Accessories[Species][AccType][Values["accessoryName"]]
The error and location it’s trying to check:
There are two scripts (one client, one server) giving the same error, the lines of code are the same in both.
Things I’ve tried:
-Checking the forums for similar situations
-Changing the ModelStreamingMode on the accessory models to Atomic or Persistent (neither help)
-Had a friend test the code to see if it was just on my end (same issue for anyone that tests it)
-Checking ReplicatedStorage while testing just to make sure the parts weren’t falling into the void
-Adding WaitForChild() when creating the Accessories variable
-Adding an overkill WaitForChild()
for AccType, Values in pairs(dataTable["accessories"]) do
for _, name in ipairs(Accessories[Species][AccType]:GetChildren()) do
print(name)
local loadedModel = Accessories[Species]:WaitForChild(name)
end
local sampleAcc = Accessories[Species][AccType][Values["accessoryName"]]
Which gives me a new error:
I cannot emphasize enough that
local Accessories = game.ReplicatedStorage:WaitForChild(“Accessories”)
does not give an infinite yield error but
local loadedModel = Accessories[Species]:WaitForChild(name)
does.


