Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i add one more currency to the leaderboard?

Asked by
Krodiix -1
4 years ago

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

Log in to vote
0
Answered by 4 years ago

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)

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? Krodiix -1 — 4y
0
If you send me the script I will be able to fix it FluffySheep46209 369 — 4y
0
What do you mean? MacaylaMarvelous81 15 — 4y
Ad

Answer this question