How do I add Datastore? I have an Leaderboard Script that I works Perfect but I really neeed a Datastore to save the Points. Thing is I have never done Datastore, so How do I add DataStore to this script?
This Is The Leaderboard Script
players = game:GetService('Players')
startingcash = 0
-- Variables
players.PlayerAdded:connect(function(plr)
local stats = Instance.new('IntValue')
local cash = Instance.new('IntValue')
stats.Name = 'leaderstats'
cash.Name = 'Points'
cash.Parent = stats
cash.Value = startingcash
stats.Parent = plr
local AddPointGui = script.Parent.Parent.StarterGui.HandtoGui.Accept.Yes
AddPointGui.MouseButton1Click:connect(function()
cash.Value = cash.Value + 1
end)
end)

1 comment
Read this http://wiki.roblox.com/index.php?title=Data_store