Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I save and load point stats?

I need help with saving a point system and it loading when someone rejoins. Here's what I'm using to add 1 point every 10 seconds:

amount = 1
timedelay = 10
currencyname = "Points"

while true do
	wait(timedelay)
	for i,v in pairs(game.Players:GetPlayers()) do
		if v:FindFirstChild("leaderstats") and v then
			v.leaderstats[currencyname].Value = v.leaderstats[currencyname].Value + amount
		end
	end
end

1 answer

✓ Accepted answer

In order to save and load previously saved data on Roblox, you need to using datastores.

it's a quite advanced topic, so it might take you a while to get there, but once you get the hang of it, it's easy!

I would give you some example code, but it's extensive, there's good tutorials on YouTube with things explained step by step. A good one is by AlvinBox, found here

This discussion is preserved as it was. New answers, comments, and votes are closed.