game.Players.PlayerAdded:Connect(leaderboardSetup) game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = Player local cash = Instance.new("NumberValue") cash.Name = "Cash" cash.Value = 0 cash.Parent = leaderstats player.CharacterAdded:Connect(function(Character) Character.Humanoid.Died:Connect(function(Died) local creator = Character.Humanoid:FindFirstChild("creator") local leaderstats = creator.Value:FindFirstChild("leaderstats") if creator ~= nil and creator.Value ~= nil then leaderstats.Cash.Value = leaderstats.Cash.Value + 10 end end) end) end) end)
idk y if u know pls type why and the fixed script ill accept the answer if its correct i check every hour
In this script, you are looking for a child of a value, which wont exist. Use bindableevents to fire between scripts
--Script in the tool (add this in with the gun, Hit = raycast.Instance or whatever you use local Player = game.Players:GetPlayerFromCharacter(script.Parent.Parent) or script.Parent.Parent.Parent local Tagged = Instance.new("ObjectValue") Tagged.Name = "creator" Tagged.Value = Player Tagged.Parent = Hit.Parent.Humanoid game.Debris:AddItem(Tagged, 2) --Script inside the zombie local Character = script.Parent Character.Humanoid.Died:Connect(function() if Character.Humanoid:FindFirstChild("creator") then local Player = Character.Humanoid.creator.Value local Leaderstats = Player.leaderstats Leaderstats.Cash.Value += 10 end end