memro
|
  |
| Joined: 08 Aug 2011 |
| Total Posts: 10605 |
|
|
| 11 Jun 2014 01:35 PM |
I just want it to reward a player 90 Player Points when they manage to kill me.
game.Players.PlayerAdded:connect(function(p) repeat wait() until p.Character p.Character.Humanoid.Died:connect(function() if p.Character.Humanoid:FindFirstChild("memro") then game:GetService("PointsService"):AwardPoints(p.userId,90) end end) end)
p.CharacterAdded:connect(function(c) c.Humanoid.Died:connect(function() if c.Humanoid:FindFirstChild("memro") then game:GetService("PointsService"):AwardPoints(p.userId,90) end end) end) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 11 Jun 2014 01:39 PM |
| Go in-game, press F9, tell errors. |
|
|
| Report Abuse |
|
|
memro
|
  |
| Joined: 08 Aug 2011 |
| Total Posts: 10605 |
|
|
| 11 Jun 2014 01:43 PM |
| I'll get back to you in just a sec |
|
|
| Report Abuse |
|
|
memro
|
  |
| Joined: 08 Aug 2011 |
| Total Posts: 10605 |
|
|
| 11 Jun 2014 01:51 PM |
| There aren't any related errors :/ |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2014 02:12 PM |
| Did you have someone kill you? Cause it wont throw an error until the script is ran. :P |
|
|
| Report Abuse |
|
|
memro
|
  |
| Joined: 08 Aug 2011 |
| Total Posts: 10605 |
|
|
| 11 Jun 2014 02:12 PM |
I changed it up a bit and when he killed me I got the 90 points and not him. ugh this is so difficult
local playerName = "memro" local service = game:GetService("PointsService")
game.Players.PlayerAdded:connect(function(p) repeat wait() until p.Character p.Character.Humanoid.Died:connect(function() if string.lower(p.Name) == string.lower(playerName) then if p.Character.Humanoid:FindFirstChild("creator") then game:GetService("PointsService"):AwardPoints(p.userId,90) end end end) p.CharacterAdded:connect(function(c) c.Humanoid.Died:connect(function() if string.lower(p.Name) == string.lower(playerName) then if c.Humanoid:FindFirstChild("creator") then game:GetService("PointsService"):AwardPoints(p.userId,90) end end end) end) end) |
|
|
| Report Abuse |
|
|