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

I want to make currency.. but how?

1 answer

Easy to do! First, insert a server script inside ServerScriptService.

Script:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	
	local leaderstats = Instance.new("Folder")
	leaderstats.Parent = player
	
	local Cash = Instance.new("IntValue")
	Cash.Name = "Cash"
	Cash.Value = 50
	Cash.Parent = leaderstats
	
end)

##Explanation

We use PlayerAdded function so that it fires whenever a player joins. We create a folder and name it leaderstats, parent it to the player. We create an IntValue, name it Cash, Set it's value and parent it inside the leaderstats!

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