|
| 08 Jun 2014 02:09 AM |
local PointsService = Game:GetService("PointsService")
script.Parent.MouseClick:connect(function(player) if player:WaitForChild('leaderstats'):WaitForChild('Credits').Value >= 0 then pcall(function() local pointsToAward = PointsService:GetAwardablePoints() if pointsToAward > 50 then PointsService:AwardPoints(player.userId, 50) player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 0 end print('awarded') end) end end) player.Character:BreakJoints()
Doesnt award points, Doesnt BreakJoints
Why? |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 08 Jun 2014 02:27 AM |
local PointsService = Game:GetService("PointsService")
script.Parent.MouseClick:connect(function(player) if player:WaitForChild('leaderstats'):WaitForChild('Credits').Value >= 0 then pcall(function() local pointsToAward = PointsService:GetAwardablePoints() if pointsToAward > 50 then PointsService:AwardPoints(player.userId, 50) player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 0 end print('awarded') end) end player.Character:BreakJoints() end)
Maybe cause there are no points ingame. |
|
|
| Report Abuse |
|
|
| |
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 08 Jun 2014 04:29 AM |
MouseClick Returns nothing. This should work:
script.Parent.MouseClick:connect(function() if game.Players.LocalPlayer:WaitForChild('leaderstats'):WaitForChild('Credits').Value >= 0 then pcall(function() local pointsToAward = PointsService:GetAwardablePoints() if pointsToAward > 50 then PointsService:AwardPoints(game.Players.LocalPlayer.userId, 50) game.Players.LocalPlayer.leaderstats.Credits.Value = game.Players.LocalPlayer.leaderstats.Credits.Value - 0 end print('awarded') end) end game.Players.LocalPlayer.Character:BreakJoints() end) |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 08 Jun 2014 04:56 AM |
@youssef yes it does nub
script.Parent.ClickDetector.MouseClick |
|
|
| Report Abuse |
|
|