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

How can i have 2 "Currency" leaderstats at once?

I wanted to make a christmas event and make another leaderstat: "Gifts". I tried separating them into 2 different scripts, but if i change the coin.name to Gifts then it would just change the entire coin currency into Gifts.

1 comment

0

could you please send your leaderstats script

1 answer

Try this:

-- Declare the leaderstats and set their initial values to 0 local leaderstats = Instance.new("Folder") leaderstats.Name = "Leaderstats"

local coins = Instance.new("IntValue") coins.Name = "Coins" coins.Parent = leaderstats coins.Value = 0

local gifts = Instance.new("IntValue") gifts.Name = "Gifts" gifts.Parent = leaderstats gifts.Value = 0

-- Add the leaderstats to the player's character leaderstats.Parent = game.Players.LocalPlayer.Character

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