|
| 02 Aug 2014 01:08 PM |
Why won't this work? (I tried smashing 2 scripts together). Before I added this:
function onHumanoidDied(humanoid, player) local ack = player:findFirstChild("leaderstats") if ack ~= nil then local deaths = ack:findFirstChild("Deaths") deaths.Value = deaths.Value + 1
It would show the Death Leaderstat but it wouldnt change values. Now it doesn't show the leaderstats at all.
function oa(object) local player = game.Players:playerFromCharacter(object) if player ~= nil then local ls = player.leaderstats local sl = game.Workspace:FindFirstChild(ls.Stage.Value) print("gah") object.Torso.CFrame = object.Torso.CFrame + Vector3.new(0,3,0) wait() object.Torso.CFrame = sl.CFrame + Vector3.new(0,3,0) end end
function oe(object) if object.className == "Player" then local ack = Instance.new("IntValue") ack.Name = "leaderstats" local ack2 = Instance.new("IntValue") ack2.Name = "Stage" ack2.Value = 0 ack2.Parent = ack local ack3 = Instance.new("IntValue") ack3.Name = "Deaths" ack3.Value = 0 ack3.Parent = ack ack.Parent = object end end
function onHumanoidDied(humanoid, player) local ack = player:findFirstChild("leaderstats") if ack ~= nil then local deaths = ack:findFirstChild("Deaths") deaths.Value = deaths.Value + 1
game.Players.ChildAdded:connect(oe) game.Workspace.ChildAdded:connect(oa) end end
|
|
|
| Report Abuse |
|
|
|
| 02 Aug 2014 01:14 PM |
function oe(object) if object.className == "Player" then local ack = Instance.new("IntValue") ack.Name = "leaderstats" local ack2 = Instance.new("IntValue") ack2.Name = "Stage" ack2.Value = 0 ack2.Parent = ack local ack3 = Instance.new("IntValue")
---------
You need to put your leader stats in player Than whatever you want in leaderstats it's self |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2014 01:18 PM |
| Are you talking about putting the script in player? If so, It has worked without being in there already. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|