Hi everyone! I want to make a script that give a player a certain number of points, how do I make a command to do that?
✓ ANSWER ACCEPTED
How do I make a a point system where I can make a command that awards a player number of points?
1 answer
✓ Accepted answer
ok, so create a script (inside ServerScriptService or Workspace), and write this:
game.Players.PlayerAdded:Connect(function(plr)
local lead = Instance.new("Folder", plr)
lead.Name = "leaderstats" -- WHEN YOURE MAKING A LEADERBOARD, ALWAYS USE THIS NAME
local currency = Instance.new("IntValue", lead)
currency.Name = "Points"
currency.Value = 100
end)
However, if you're making a part to give you points, also write this in the script:
local part = game.Workspace:WaitForChild:("Part"0
rebounce = false
part.Touched:Connect(function(hit)
local lead = hit.Parent:WaitForChild("leaderstats")
local points = lead:WaitForChild("Points")
if lead ~= nil then
rebounce = true
points.Value = points.Value + 25
wait(3)
rebounce = false
end
end)
1 comment
0
I would really like a command like ;points (username) (number of points).
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
This is not a request site, please attempt this code yourself. We'll help you with your errors, but we won't write a whole script for you.
There are a lot of helpful tutorials on Youtube, so please take a look at those and, like killerbrenden said, please attempt the code yourself.
I would give a script if it wasn't against the rules.