How to make this locally show damage to the player that did it only

I’ve tweaked this script by adding adjustments which the label is shown on the screen GUI showing the damage value on the screen. So why does it show damage to everyone when I use it as a local script? I only want the damage value shown only to the player that does damage. I know there are a bit of errors that the text doesn’t extend the 3 seconds every time I hit, but that’s fine for now and something about recursion. If there are any better scripts or something that can help and you’re willing to share, then I’ll use that information.

wait(3)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local label = script.Parent

function updatePos()
	label.Position = UDim2.fromOffset(mouse.X,mouse.Y)
end

mouse.Move:Connect(updatePos)

function Track(Humanoid)
	local Last = Humanoid.Health
	local function HealthChanged(Left)
		if Left < Last then
			local Part = Humanoid.Parent:FindFirstChildWhichIsA("BasePart")
			if Part then
				label.TextTransparency = 0
				label.Visible = true
				label.Text = math.floor(Last - Left)
				wait(.1)
				if Left < Last then
					wait(3)
					for i = 0, 1, 0.05 do
						label.TextTransparency = i
						wait(.05)
					end
					label.Visible = false
					return
					
				else
					wait(3)
					for i = 0, 1, 0.05 do
						label.TextTransparency = i
						wait(.05)
						label.Visible = false
						end
					end
			end
			Last = Left
		end
	end
	Humanoid.HealthChanged:Connect(HealthChanged)
end

local D = game.Workspace:GetDescendants()
for i = 1,#D do
	if D[i]:IsA("Humanoid") then
		Track(D[i])
	end
end
function Added(item)
	if item:IsA("Humanoid") then
		Track(item)
	end
end
game.Workspace.DescendantAdded:Connect(Added)

Are you sure that the damage is showing to everyone? I’m pretty sure it won’t show to everyone if it is done locally.

This should help

I ran a local server with 2 players and tested it. Player 1 shoots a dummy and Player 2 doesn’t get affected, but it sees the damage value on screen

Try testing it on the actual Roblox itself and get a friend or your alt account to join you. It could be just a bug in Roblox Studio Local Server testing. (This is just a test to make sure that the problem doesn’t come from Studio)