Would this work? or not?
for i,v in pairs(game.Players:GetChildren()) do if v.Health == 0 then a = game.Lighting.Money:clone() a.Main.CFrame = v.Charecter.Head.CFrame a.Main.Money.Value = v.leaderstatus.Money.Value a.Parent = game.Workspace end end
game:GetService("Players").PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) local hum = c:WaitForChild("Humanoid") hum.Died:connect(function() local a = game.Lighting.Money:Clone() a.Main.CFrame = c.Head.CFrame a.Main.Money.Value = p.leaderstats.Money.Value a.Parent = Workspace end) end) end)
Try this.
for i,v in pairs(game.Players:GetChildren()) do v.Character.Humanoid.Died:connect(function() a = game.Lighting.Money:clone() a.Main.CFrame = v.Character.Head.CFrame a.Main.Money.Value = v.leaderstats.Money.Value a.Parent = Workspace end) end