Hey, my game was working fine before and I didn’t change anything. After playing the game in a normal Roblox server, the game broke and no longer loads.
Problem: game does not load and it is stuck on this screen
for _, item in pairs(equippedToSave) do --loads in equipped
if item and allItems[item] and items:FindFirstChild(item) then
local itemC = allItems[item]:Clone()
itemC.Parent = equipped
end
end
I changed the datastore name and it actually ended up fixing it. So, the reason for this problem is the data that got saved
The equippedToSave variable is what you see in the output. It is just a list of all the items’ names you have equipped in the previous session. If you think that the cause of the problem is something else then I can provide more code. I think that this part is causing it because I commented everything else out and it worked fine until I reached this part.
I commented everything else out and I found out that this is the point where the problem occurs. I don’t think that it’s an infinite loop because in studio you usually get a popup that allows you to kill the script. The two prints were made because those were the only two items that I had on in the previous session.
Is the only issue the loading screen won’t go away? Or does you studio crash and create a lot of lag?
If the only issue is with the loading screen, couldn’t you remove it manually?
You found a solution! That’s great! However, others that view this post will have no clue what that solution is, and saying “I fixed the bug” does not help. It would be greatly appreciated if you replied what you did to find the solution instead of posting a reply that explains nothing.