Why my damage indicator not work

Idk why my damage indicator not working but its work last time


local TS = game:GetService("TweenService")

function roundNumber(num, numDecimalPlaces)
	return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num))
end

local DamageBoard = game.ReplicatedStorage.DamageBoard

for i, v in pairs(game.Workspace:GetChildren()) do
	if v:IsA("Model") then
		if v:FindFirstChildWhichIsA("Humanoid") then
			local hum = v:FindFirstChildWhichIsA("Humanoid")
			local humH = hum.Health

			hum.HealthChanged:Connect(function(Health)
				local DamageDealted = roundNumber(humH-Health,1)

				local damageGui = game.ReplicatedStorage.DamageBoard:Clone()
				damageGui.Parent = v.PrimaryPart
				damageGui.Damage.Text = DamageDealted
				damageGui.ExtentsOffset = Vector3.new(math.random(-3,3),3,0)

				if not v:FindFirstChild("CustomVFX") then
					local hiteffect = script.HitEffect.Attach:Clone()
					hiteffect.Parent = v.HumanoidRootPart

					for i, v in pairs(hiteffect:GetChildren()) do
						if v:IsA("ParticleEmitter") then
							v:Emit(math.random(3,6))
						end
					end

					game:GetService("Debris"):AddItem(hiteffect,2)
				end

				if not v:FindFirstChild("CustomSFX") then
					local hiteffect = script.HitSoundTW:Clone()
					hiteffect.Parent = v.HumanoidRootPart

					game:GetService("Debris"):AddItem(hiteffect,2)
				end

				local tween = game.TweenService:Create(damageGui.Damage,TweenInfo.new(1.5),{TextTransparency = 1, TextStrokeTransparency = 1})
				tween:Play()

				tween.Completed:Connect(function()
					damageGui:Destroy()
				end)

			end)
		end
	end
end


Any errors? If not I recommend running some prints to see where the script stops running.

Nope , Dont have any error in the output

Did you check if anything is right in the script there might be something wrong with name of the object or a line idk

Everything seen normal and i didnt change the script when its work

Can you send me a video so I can see what’s wrong.

Oh i find something bugged in the script, it only work with only 1 player in the server, if the server have more than 2 players its bug , any way to fix it?

What does the glitch look like?

There’s a good chance that this might be a server script, and when you have more than one player it runs twice.