Hello I have another issue, this time considering to my Data to the game Button Simulator.
No matter what I’ve tried, putting waits, putting another folder, nope, nothing.
Prestige will be a new currency will be added to the version 2.0 that’ll multiply Ultra Rebirth.
My 73-lines ServerScript in ServerScriptService:
local Data = game:GetService("DataStoreService"):GetDataStore("randomthingloldataxd")
local mps = game:GetService("MarketplaceService") -- Coming soon
game.Players.PlayerAdded:Connect(function(plr)
local ls = Instance.new("Folder", plr)
ls.Name = "leaderstats"
task.wait(0.1)
local cash = Instance.new("NumberValue",ls)
cash.Name = "Cash"
cash.Value = 0
task.wait(0.1)
local multi = Instance.new("NumberValue",ls)
multi.Name = "Multiplier"
multi.Value = 1
task.wait(0.1)
local reb = Instance.new("NumberValue",ls)
reb.Name = "Rebirth"
reb.Value = 1
task.wait(0.1)
local ureb = Instance.new("NumberValue",ls)
ureb.Name = "Ultra Rebirth"
ureb.Value = 1
local AvailableStatsButCantBeInTheLeaderstats = Instance.new("Folder",plr)
AvailableStatsButCantBeInTheLeaderstats.Name = "leaderstats #2"
task.wait(0.1)
local pres = Instance.new("NumberValue", AvailableStatsButCantBeInTheLeaderstats)
pres.Value = 1
pres.Name = "Prestige"
local dataload = Data:GetAsync(tostring(plr.UserId))
if dataload then
print("The leaderstats has successively loaded.")
cash.Value = dataload[1]
multi.Value = dataload[2]
reb.Value = dataload[3]
ureb.Value = dataload[4]
pres.Value = dataload[5]
elseif not dataload then
error("Sorry, the leaderstats has failed to load.")
end
if pres.Value == 0 then
error("Error On The Currency"..'"Prestige".')
return
end
while task.wait(1/30) do
cash.Value = cash.Value + (1*(multi.Value+0))
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
Data:SetAsync(tostring(plr.UserId),{
plr.leaderstats.Cash.Value,
plr.leaderstats.Multiplier.Value,
plr.leaderstats.Rebirth.Value,
plr.leaderstats["Ultra Rebirth"].Value,
plr["leaderstats #2"].Prestige.Value
})
end)
Without the extra line, at the end, it’s 72.
Video:
To be exact, here’s the Images:
The Cyan one is Prestige.
I mean I guess that makes sense why it errors.
I don’t know how this does not works, just tell me how.
When I remove the Prestige value, the Gui will not work, that’s for sure, because if nothing’s related to the Prestige it’ll simply error it’s because 7 Currencies, meant by 7 TextLabels related to them.
I have 5 Currencies, then 5 TextLabels related to them.
Here’s the LocalFile:
Random name 2 (can’t think of a name).rbxl (140.7 KB)
So yeah guys, any help is appreciated, also do not change my 73-lines script to a something like 25 lines script, to told me to put a folder inside of the Data Script.