lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
|
| 24 Apr 2014 05:48 PM |
Here is the script that I am using..
local PointsService = Game:GetService("PointsService") local ting = 0
function onTouched(hit)
if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats")
if stats ~= nil then local cash = stats:findFirstChild("Cash") cash.Value = cash.Value - 20000 PointsService:AwardPoints(player.userId, 1)
wait(5) end
end
ting = 0 end
end
script.Parent.Touched:connect(onTouched)
It doesn't give any points after it takes the cash and it breaks. I believe I set it up wrong but as it's new I have no idea how to do it. (Wiki doesn't have any information that useful for this) |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 05:50 PM |
You have a limit of Player Points to award.
Lets say someone buys your gamepass for 100 robux. 70 robux is given to you after the fee subtracts 30% and 70 Player Points is generated in your place to award. |
|
|
| Report Abuse |
|
|
lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
|
| 24 Apr 2014 05:53 PM |
| My game has over 30,000 player points. I know how they work. But I just don't know how to script it. |
|
|
| Report Abuse |
|
|
lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
| |
|
|
| 24 Apr 2014 06:03 PM |
| Have you tried turing it on and off again? |
|
|
| Report Abuse |
|
|
lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
| |
|
lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
| |
|
|
| 24 Apr 2014 07:13 PM |
Try this
local PointsService = Game:GetService("PointsService") local ting = 0
function onTouched(hit)
if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats")
if stats ~= nil then local cash = stats:findFirstChild("Cash") cash.Value = cash.Value - 20000 PointsService:AwardPoints(user.userId, 1) -- You were originally awarding it to 'player', and that wasn't specified in the script
wait(5) end
end
ting = 0 end
end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|