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

How do i make Player Points in my game? [closed]

Asked by 10 years ago

How do i have Player Points and How do i Make them Awarded to players in my game?

Closed as Not Constructive by fireboltofdeath and User#2

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?

2 answers

Log in to vote
-1
Answered by 10 years ago

This will help: http://wiki.roblox.com/index.php?title=Player_Points

You have 81k Player Points, you can award them to players in your game. Just read the wiki tutorial above.

0
I thought it goes off of place budget and not how many Player Points the developer has. If that was the case as soon as everyone runs out, everyone runs out. Gamenew09 180 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

To use the service, we use game:GetService("PointsService"). Then we have the following

:GetAwardablePoints() First you need to see if your server has enough Points to award. We use :GetAwardablePoints() to check this.

Example:

service = game:GetService("PointsService") --Declares Service
print(service:GetAwardablePoints())
--This will only work in normal scriots and a live server (Play button, not in studio)

:AwardPoints(userId,num) To award points, we use :AwardPoints(userId,num). In the first section of the bracket, we say the userId of the player. In the second, we then type how many points we want to give.

Example:

--Lets say someone clicks a button to earn 1 player point...
script.Parent.MouseButton1Click:connect(function(player) --Creates the function and calls the player
    if service:GetAwardablePoints() > 0 then --if there are any points then...
        service:AwardPoints(player.userId,1) --Gives the person who clicked 1 Player Point
    end --ends the if statement
end)--Ends the function

REMEMBER YOU MUST DO THIS IN A NORMAL SCRIPT OR IT WON'T WORK

0
You should use print(service:GetAwardablePoints()), not print(service:GetAwardablePoints). gskw 1046 — 10y