I made a kill counter but it isn't doing anything when you kill someone. Perhaps it is something wrong with the script?
Addkill
is a localscript
local addkill = game.ReplicatedStorage.AddKill game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) Character:WaitForChild("Humanoid").Died:Connect(function() local oof = Character.Humanoid:FindFirstChild("creator") if oof ~= nil then if oof.Value ~=nil then addkill:Clone().Parent = game.StarterPack end end end) end) end)
or is it something wrong with the localscript
wait(1) local plr = game.Players.LocalPlayer.StarterPack.Kills if script.Parent == game.StarterPack then plr.Value = plr.Value + 1 print("kill") wait(0.1) script:Destroy() end
Kills
is a numbervalue
If FilteringEnabled is enabled, increasing a value with a local script will not be saved to the server. To save it to the server you would need to use RemoteFunctions or RemoteEvents.