How do i have Player Points and How do i Make them Awarded to players in my game?
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.
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
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?