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

How do I create a currency type only that the name would be "Fruits"?

Asked by
waveend -15
5 years ago
Edited 5 years ago

I am making a game that when the player destroys a fruit, this player gains 1 point as fruit in the leaderboard

Please help me

0
Why was moderation taken against my question and not this one? Jexpler 63 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Put this in a Script inside Server Script Service and you should see "Fruits" under the leaderboard.

game.Players.PlayerAdded:connect(function(p)
    local stats = Instance.new("Folder")
    stats.Name = "leaderstats"
    stats.Parent = p

    local fruits = Instance.new("IntValue")
    fruits.Name = "Fruits"
    fruits.Value = 0
    fruits.Parent = stats
end)

0
This is incorrect. It's a folder not IntValue green271 635 — 5y
0
Why is it downvoted? Vulkarin 581 — 5y
0
@Vulkarin No explanation I'd assume User#22604 1 — 5y
0
>green271 you can use as Folder Mitumitu17YN -5 — 5y
Ad

Answer this question