Why this damage script not working

script inside hitbox:::

script.Parent.Touched:Connect(function(part)
	print(part)
	if part.Parent:FindFirstChild("Humanoid") ~= nil then
		part.Parent:FindFirstChild("Humanoid"):TakeDamage(100)
	end
end)

I dontt think there ie anything wrong with the script


it doesnt print part

You have CanTouch set to false on the hitbox part. The Touched event won’t fire with parts with that property set to false.

1 Like

As Scallium has said, that may be the issue, however, I recommend you use

humanoid.Health -= 100 or humanoid.Health = humanoid.Health - 100

Why not :TakeDamage()? That method is a lot more clearer and should be used, unless OP wants their swords to not account for forcefields.

1 Like

Both :TakeDamage() and Humanoid.Health -= Value work around the same way. There is no need in changing it.