skinny02
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 50 |
|
|
| 13 Apr 2013 02:34 PM |
game.Players.PlayersAdded:connect(function(player) local leaderstats = Instance.new(Model, player) leaderstats.Name = "leaderstats"
local kill = Instance.new("IntValue", leaderstats) kill.Name = "Kills" kill.Value = 0
end) |
|
|
| Report Abuse |
|
|
skinny02
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 50 |
|
| |
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Apr 2013 06:05 PM |
Leaderboard script coming right up:
function onDied(hum) local tag = hum.Parent:FindFirstChild("creator") if tag ~= nil then local stat = tag.Value.leaderstats stat.Kills.Value = stat.Kills.Value + 1 end function onPlayerAdded(plr) local stats = Instance.new("IntValue", plr) stats.Name = "leaderstats" local kills = Instance.new("IntValue", plr) kills.Name = "Kills" kills.Value = 0 plr.Character.Humanoid.Died:connect(onDied) end game.Players.ChildAdded:connect(onPlayerAdded) |
|
|
| Report Abuse |
|
|
skinny02
|
  |
| Joined: 07 Apr 2013 |
| Total Posts: 50 |
|
|
| 14 Apr 2013 06:08 PM |
| Error in script: 'end' expected (to close 'function' at line 1) |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Apr 2013 06:42 PM |
function onDied(hum) local tag = hum.Parent:FindFirstChild("creator") if tag ~= nil then local stat = tag.Value.leaderstats stat.Kills.Value = stat.Kills.Value + 1 end end function onPlayerAdded(plr) local stats = Instance.new("IntValue", plr) stats.Name = "leaderstats" local kills = Instance.new("IntValue", plr) kills.Name = "Kills" kills.Value = 0 plr.Character.Humanoid.Died:connect(onDied) end game.Players.ChildAdded:connect(onPlayerAdded) |
|
|
| Report Abuse |
|
|