Rewarding player not working

So I’m trying to add to the kills value to the player who killed a player. It is not working, but it’s not giving an error! How can I fix this problem?

Client (LocalScript:)

script.Parent.KillsValue.OnClientEvent:Connect(function(the_player)
	local leaderstats = the_player:FindFirstChild("leaderstats")
	local RoundKills = the_player:FindFirstChild("RoundKills")
	local Kills = leaderstats:FindFirstChild("Kills")
	
	wait(0.5)
	RoundKills.Value += 1
	Kills.Value += 1
end)

Server (Script:)

function hitDetection(hit,ray, mousepos)
	local the_player = game.Players:GetPlayerFromCharacter(character)
	local model = hit:FindFirstAncestorOfClass("Model")
	if model then
		local humanoid = model:FindFirstChildWhichIsA("Humanoid")
		if humanoid then
			if hit.Name == "Head" then
				humanoid:TakeDamage(configuration.HeadShotDamage)
				if humanoid.Health == 0 then
					script.Parent.KillsValue:FireClient(the_player)
				end
			else
				humanoid:TakeDamage(configuration.Damage)
				print(the_player)
				if humanoid.Health == 0 then
					script.Parent.KillsValue:FireClient(the_player)
				end
			end
		else
			return true
		end
	end
end

Help soon,

papahetfan

If there isn’t a specific reason for having the changes to the stat values on the client, I’d recommend setting the values on the server. Does your print statement print? Could you try adding more print statements to see which line it gets to before not working as expected?

My print statement does work, it prints my username. I’ll give it a try in the server, but I always struggle in the server.

Still does not work. I’m stooting an NPC btw.

My code:

if humanoid.Health == 0 then
					local leaderstats = the_player:FindFirstChild("leaderstats")
					local RoundKills = the_player:FindFirstChild("RoundKills")
					local Kills = leaderstats:FindFirstChild("Kills")
					Kills.Value += 1
					RoundKills.Value += 1
				end