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

How do I make a a point system where I can make a command that awards a player number of points? [closed]

Asked by 4 years ago

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?

1
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. killerbrenden 1537 — 4y
0
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. blarp_blurp645 63 — 4y
0
I would give a script if it wasn't against the rules. FrostedFlakes67 71 — 4y

Closed as Not Constructive by Shawnyg

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 4 years ago

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)

0
I would really like a command like ;points (username) (number of points). RadRosieee 8 — 4y
Ad