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 add one more currency to the leaderboard?

I have a script for a currency called "Coins" and i need to add one more called "Diamonds" How can i do this without adding one more script?

game.Players.PlayerAdded:connect(function(plr)
	local folder = Instance.new("Folder", plr)
	folder.Name = "leaderstats"
	local value = Instance.new("IntValue", folder)
	value.Name = "Coins"
	value.Value = 0 -- starting cash
end)

1 answer

✓ Accepted answer

after line 6:

local dia = Instance.new("IntValue", folder)
dia.Name = "Diamonds"
dia.Value = 0

This will create another value and add it to the leaderstats folder. Then it will call it Diamonds and set it to 0 (starting cash)

3 comments

0

I made this and it worked! but i need to put this into a developer product shop and i can't, what i am doing wrong?

0

If you send me the script I will be able to fix it

0

What do you mean?

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