Saving System Bug

So, I put the TextButton into a Frame, and now it’s not working anymore, why? I also get no Error or Warning. It’s a Saving System btw. Sorry, but I’m a little Noob who needs help from the Internet.

Old (working):

New(Buggy)

1 Like

I see the problem, at least I think, you’ve forgotten to rename the code to match the new frame’s name.

If I understand correctly, the new frame is named Detector, however in your code when you initialize the for loop, it still says game.StarterGui.Upgrades.FRAME <— change that to Detector and see if it works.

scratch that its not it haha

1 Like

I think it might be because you added a z to the end of the Cost TextLabel. It’s not getting an error because you are looking for Cost not Costz, so it just kind of ignores it. Also,

game.StarterGui.Upgrades.Frame.Detector.AutoClicker:GetChildren()
1 Like

The Frame is still existing in the new one.

I also think you need to do

game.StarterGui.Upgrades.Frame.Detector.AutoClicker:GetChildren()

because there is nothing besides AutoClicker in the Detector frame.

Also not working :confused: Also i change the Cost.Value and not the Costz.

Maybe its bc you’re looping through startergui?
StarterGui will not update with new information and thus it will always be what you put in it in studio
What you would be looking for is Player.PlayerGui maybe doing that will fix it?

Edit I see that in the old one it uses it as well but even then it shouldn’t update so maybe it isn’t the problem but it does need to be changed

1 Like

why don’t you just do

if game.StarterGui.Upgrades.Fram.Detector.AutoClicker.Cost then
d[v.Name] = game.StarterGui.Upgrades.Fram.Detector.AutoClicker.Cost.Value
end

and also, you should try to do the GetDefaultUpgradesCostsDictionary function locally, and pass it to the server so you can save it as one separate persons data. It’s going to probably save as 0 considering that the server probably just sees the value as just 0.