Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make touched event run once for each specific part?

Asked by 4 years ago

It would be pretty broken if one hitbox inflicts multiple damage if it registers one part multiple times, whats the solution to this?

1 answer

Log in to vote
0
Answered by 4 years ago

You would have to get a table of all objects in the workspace and remove them from the table when they activate the Touched function, then make sure one of the conditions for damage to be taken is that the touched object must be present in the table.

Ad

Answer this question