|
| 18 May 2014 05:53 AM |
so, what i want is a brick that can be clicked, when someone clicks it, if they have 10 or more of a leaderstat named Points, it will give them 1 player point. but if they dont have enough points, nothing will happen |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 May 2014 06:34 AM |
pay first http://www.roblox.com/payment-place?id=155841908
|
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
|
| 18 May 2014 06:43 AM |
| No, believe me or dont believe me, I dont scam. |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 06:55 AM |
try this then
local PointsService = Game:GetService("PointsService")
script.Parent.MouseClick:connect(function(player) if player:WaitForChild('leaderstats'):WaitForChild('Points').Value >= 10 then pcall(function() local pointsToAward = PointsService:GetAwardablePoints() if pointsToAward > 0 then PointsService:AwardPoints(player.userId, 1) end print('awarded') end) end end)
--should work
|
|
|
| Report Abuse |
|
|
|
| 18 May 2014 07:06 AM |
| Do i need a clickdetector or anything? |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 18 May 2014 07:07 AM |
| Yes, put this script in the clickdetector, and the clickdetector in the brick. |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 07:32 AM |
| how do i make it so it takes the 10 points off when clicked |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 18 May 2014 07:35 AM |
local PointsService = Game:GetService("PointsService")
script.Parent.MouseClick:connect(function(player) if player:WaitForChild('leaderstats'):WaitForChild('Points').Value >= 10 then pcall(function() local pointsToAward = PointsService:GetAwardablePoints() if pointsToAward > 0 then PointsService:AwardPoints(player.userId, 1) player.leaderstats.Points.Value = player.leaderstats.Points.Value - 10 end print('awarded') end) end end) |
|
|
| Report Abuse |
|
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 18 May 2014 08:04 AM |
| OP is gonna say it doesn't work just so that he doesn't have to pay 208 Robux. |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 08:06 AM |
Smiley, TBC and 208 robux, don't you see a god damn difference?
Russian of ATR |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 18 May 2014 08:20 AM |
I think I understand. Greed. |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 08:47 AM |
i gave you the script you wanted
pay me by today or i'll report you for scamming and say bye bye to your lovely tbc and money (pfft, 200 robux). |
|
|
| Report Abuse |
|
|
LokHsuLi
|
  |
| Joined: 02 Feb 2013 |
| Total Posts: 136 |
|
|
| 18 May 2014 09:32 AM |
| succulence, maybe it doesn't work cos u dont have any Points in ur Game :/ |
|
|
| Report Abuse |
|
|