|
| 25 Apr 2014 06:38 PM |
Hello, I am currently working on a game that sells t-shirts for points, I have run into some difficulty with the scripting, I want to know if anyone knows, how do I make a pad that awards the player points after they have bought one of the the t-shirts? The only script I have been able to find is this one
-- declare service local PointsService = Game:GetService("PointsService") -- Bind function to player added event game.Players.PlayerAdded:connect(function(player) -- Get total number of points the game has available local pointsToAward = PointsService:GetAwardablePoints() -- Get total number of points this game has already awarded to the player local universeBalance = PointsService:GetGamePointBalance(player.userId) -- Check if the game has points to award and if the player hasn't gotten any points yet. If both are true, then give the player a point. if ( pointsToAward > 0 and universeBalance == 0) then PointsService:AwardPoints(player.userId, 1) end end) -- Bind function to when points are successfully awarded PointsService.PointsAwarded:connect(function(userId, userBalanceinUni, userBalance) -- Show message indicating that a player has gotten points local message = Instance.new('Message', game.Workspace) message.Text = "Point awarded to " .. userId .. ". This player now has " .. userBalance .. " points total!" wait(5) message:Destroy() end)
How do I update this to be awarded by touch of a brick, or as a reward for a shirt being bought? |
|
|
| Report Abuse |
|
|
Aurazona
|
  |
| Joined: 18 Jan 2014 |
| Total Posts: 1220 |
|
|
| 25 Apr 2014 06:48 PM |
| I'm looking for the same thing qq |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 06:49 PM |
| This is pointless you know? They are suppose to be awarded for DOING things in the game, your not suppose to BUY POINTS. |
|
|
| Report Abuse |
|
|
Aurazona
|
  |
| Joined: 18 Jan 2014 |
| Total Posts: 1220 |
|
|
| 25 Apr 2014 07:57 PM |
| Who cares, buying points is easier. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 08:04 PM |
| Who cares if its easier its stupid. |
|
|
| Report Abuse |
|
|
Aurazona
|
  |
| Joined: 18 Jan 2014 |
| Total Posts: 1220 |
|
|
| 25 Apr 2014 08:06 PM |
Whatever.
I can't judge people's opinion, and you can't judge either. |
|
|
| Report Abuse |
|
|
Halpar
|
  |
| Joined: 21 Apr 2014 |
| Total Posts: 91 |
|
|
| 25 Apr 2014 08:10 PM |
function OnTouched() wait() local points = game:GetService 'PointsService' :GetAwardablePoints() if points > 0 then game:GetService 'PointsService' :AwardPoints(4812582, points) end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Halpar
|
  |
| Joined: 21 Apr 2014 |
| Total Posts: 91 |
|
|
| 25 Apr 2014 08:11 PM |
above might or might not work .
so yeah L0L |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 10:31 PM |
| thank you, ill try it to see if it works |
|
|
| Report Abuse |
|
|