tdur
|
  |
| Joined: 19 Aug 2016 |
| Total Posts: 2557 |
|
|
| 04 Sep 2016 07:01 PM |
game.Players.PlayerAdded:connect(function(p) local ls = Instance.new('Model') ls.Name = 'leaderstats' ls.Parent = p
for _,o in pairs (o) do Instance.new('IntValue', ls).Name = o end --Kill Control p.leaderstats.Kills.Value = 0 p.CharacterAdded:connect(function(char) char:WaitForChild('Humanoid').Died:connect(function() local creator = p.Character.Humanoid:FindFirstChild('creator') if(creator~=nil)then local killer = creator.Value killer.leaderstats.Kills.Value = killer.leaderstats.Kills.Value + 1 end local key = "player -"..p.userId local data = ds:GetAsync(key) if(data)then o.Kills.Value = data[1] o.Deaths.Value = data[2] else local sf = {o.Kills.Value,o.Deaths.Value} ds:SetAsync(key,sf) end --Death Control p.leaderstats.Deaths.Value = 0 p.leaderstats:FindFirstChild('Deaths').Value = p.Deaths.value + 1 end) end) end)
game.Players.PlayerRemoving:connect(function(p) local key = "player - "..p.userId local v = {p.leaderstats.Kills.Value, p.leaderstats.Deaths.Value} ds:SetAsync(key,v) end)
line 30; attempt to index field 'Kills' (a nil value)
how tho
line 30 = local sf = {o.Kills.Value,o.Deaths.Value}
@ beginning o = {"Kills","Deaths"}
im new to lua so idk what im doing wrong o3o
#code print(R$5,848) |
|
|
| Report Abuse |
|
|
| |
|
tdur
|
  |
| Joined: 19 Aug 2016 |
| Total Posts: 2557 |
|
|
| 04 Sep 2016 07:04 PM |
because im hash
#code print(R$5,848) |
|
|
| Report Abuse |
|
|
| |
|
tdur
|
  |
| Joined: 19 Aug 2016 |
| Total Posts: 2557 |
|
| |
|
tdur
|
  |
| Joined: 19 Aug 2016 |
| Total Posts: 2557 |
|
| |
|
tdur
|
  |
| Joined: 19 Aug 2016 |
| Total Posts: 2557 |
|
|
| 05 Sep 2016 11:25 AM |
broe o3o
#code print(R$5,613) |
|
|
| Report Abuse |
|
|