Hello,
I'm currently working on an RPG MMO game, and I'm trying to make a quest system with an exchange. For example: Earn 20 gold for 300 xp. So I have a LocalScript in the TextButton in a ScreenGui and the script is:
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if player.leaderstats.MobKills.Value >= 50 then
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 10000
player.leaderstats.MobKills.Value = player.leaderstats.MobKills.Value - 50
script.Parent.TextSize = 22
script.Parent.Text = "Quest Commpleted"
script.Disabled = true
end
end)
So if the player has 50 MobKills then they can exchange for 10000 Coins, this works and it updates, however it doesn't save, so when the player rejoins the game it will go back to what it was before if they hadn't clicked on the quest.
I'm not sure why it doesn't save, and I would really appreciate some help. Thanks!

1 comment
No worries! I found out a solution, I already have a Data Store for the leaderboard, the issue was that it was only this script that didn't save, so I had changed over to a normal script. Thanks for the reply anyway!