Well, I guess you can guess what I'm going to be asking about based on the title.
If you've played any Zelda game you'll understand...
Essentially, I want to create a save/load data system with 3 'files'.
I'm hoping to be able to do it in GUI form.
Currently I AM using a Leaderboard script to control a majority of everything that happens. This is the script:
function onPlayerEntered(newPlayer)
wait(.03)
local stats = Instance.new("IntValue")
stats.Name = "leaderstat"
local cash = Instance.new("IntValue")
local mun = Instance.new("IntValue")
local Wallet200 = game.Workspace.Wallet200
cash.Name = "Rupees"
cash.Value = 0
mun.Name = "WalletSize"
mun.Value = 99
cash.Changed:connect(function()
if cash.Value <= 0 then
cash.Value = 0
newPlayer.PlayerGui.Rupees.Frame.MoneyCounter.TextColor3 = script.RupeeA.Value
end
if cash.Value >= mun.Value then
cash.Value = mun.Value
newPlayer.PlayerGui.Rupees.Frame.MoneyCounter.TextColor3 = script.RupeeB.Value
end
if cash.Value 0 then
newPlayer.PlayerGui.Rupees.Frame.MoneyCounter.TextColor3 = script.RupeeC.Value
end
end)
Wallet500.Touched:connect(function()
if mun.Value > 99 then
return end
if mun.Value <= 99 then
mun.Value = 200
newPlayer.PlayerGui.Rupees.Frame.MoneyCounter.TextColor3 = script.RupeeC.Value
end
end)
mun.Parent = stats
cash.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered)
How would I transform this into a majestic save script? Explaining it to me or any help at all would be most appreciated...
I can also provide any additional scripts I'm using, and explain certain values, such as the 'script.RupeeA' mentioned.
|