LoadSaveScript has decided models don't exist

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.

Update: We figured out the issue and it was something dumb. I had misnamed a few of the accessories.

They have a value that it checks for the naming and it must absolutely match the name of the accessories model. The one we were mainly using as an example, and testing with, had an extra space in it. So we didn’t figure it out until running through all the other accessories and finding obvious cases.

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