Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 20 Jun 2013 01:02 PM |
Does this work? I cant test it at the moment.
function HumanoidDied(player) local stats = player:findFirstChild("leaderstats") if stats ~= nil then local deaths = stats:findFirstChild("WipeOuts") deaths.Value = deaths.Value + 1 end end
function playerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" stats.Parent = newPlayer local deaths = Instance.new("IntValue") deaths.Name = "WipeOuts" deaths.Value = 0 deaths.Parent = stats local humanoid = newPlayer.Character.Humanoid
humanoid.Died:connect(function() HumanoidDied(player) end) end |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
| |
|
Preston99
|
  |
| Joined: 21 Sep 2008 |
| Total Posts: 247 |
|
|
| 20 Jun 2013 02:50 PM |
You really mutilated the function at the end. Something like:
humanoid.Died:connect(function() end)
That's used as a function, not a connection. |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
| |
|
|
| 20 Jun 2013 05:00 PM |
function playerEntered(newPlayer)
local stats = Instance.new("IntValue") stats.Name = "leaderstats"
stats.Parent = newPlayer
local deaths = Instance.new("IntValue") deaths.Name = "WipeOuts" deaths.Value = 0
deaths.Parent = stats
local humanoid = newPlayer.Character.Humanoid end
humanoid.Died:connect(function() HumanoidDied(player) end) |
|
|
| Report Abuse |
|
|
Regress
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 119 |
|
|
| 20 Jun 2013 05:01 PM |
| You created a NEW function instead of CALLING the function that you created above. |
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
| |
|