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
Scallium
(Scallion)
July 19, 2023, 1:44am
#2
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
narutoiiia
(AuthenticatedTroll)
July 19, 2023, 2:01am
#3
As Scallium has said, that may be the issue, however, I recommend you use
humanoid.Health -= 100 or humanoid.Health = humanoid.Health - 100
Scallium
(Scallion)
July 19, 2023, 2:31am
#4
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.