Damage part that deals damage every frame

i tried making a damage part that deals damage every frame.
if i use part.Touched event, it would only run once.
i also tried using runservice and part:GetTouchingParts
to detect the player every frame, but if player just keeps jumping,
player can go through without getting damaged.
any idea?

Seems like you might just need to expand the hitbox

2 Likes

is there any alternative tho

also why does the second method doesnt works tho

2 Likes

Mind showing the code?, but the .Touched shouldn’t run once unless changed to :Once() instead of :Connect()

2 Likes

using Touched, it happens when any part of the avatar touches the red part. because the red part is quite flat, when you walk on it, the running animation makes each foot go up and down so they keep generating the Touched events.

1 Like

Maybe try using RunService.Heartbeat Sorry

but how about making invisible hitbox and expand it
and check touching parts every frame using runservice so that player damage in jumping too

1 Like

Try using workspace:GetPartsInPart() instead.

1 Like

You could also just try using your second method, but have an invisible box that is the same size and position as your kill brick but significantly higher so players cant jump past it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.