So I have posted something similar last time but I was having problems with the script... so I decided I might as well learn how to use GetTouchingParts I dont have a lot of knowledge about it but if someone could tell me how I would use it in a script like this then I will really appreciate it
hitbox.Touched:Connect(function(hit)
if hit.Parent.Name ~= Player.Name then
local gethum = hit.Parent:FindFirstChild("Humanoid")
if gethum then
hitbox.CanCollide = false
hitbox:Destroy()
gethum:TakeDamage(5)
end
end
end)

1 comment
part:GetTouchingParts() returns a table of all parts touching it, you could loop through the table to find a certain part. This is my best way of explaining it.