Help Detecting Touch from a part

I need help finding a good and reliable way other than touched events to trigger if my sword slashes a window. I’ve tried using touched events but the event doesn’t get triggered. Same for a hitbox. Any other reliable ways I can use to detect touch?

Video:
robloxapp-20230519-2015512.wmv (638.2 KB)

1 Like

Have you tried this?

Didn’t know this existed, ill check it out. Thanks for the help!

1 Like

After looking for some time, I can only see that this detects the humanoid and the parts in the characters model.

newHitbox.OnHit:Connect(function(hit, humanoid)
	print(hit)
	humanoid:TakeDamage(50)
end)

I can’t figure out how to change it to detect a part instead.

Try changing the detection mode. Here is documentation:

And here is a code example:

newHitbox.DetectionMode = RaycastHitbox.DetectionMode.PartMode

you can use instance a part (for the sword slash hitbox) and use magnitude to see if its touching the window