1 messages · Page 1 of 1 (latest)
I have a custom function that tags a mob and after 3 seconds the tag gets removed; however, if the mob dies before those 3 seconds are up an error will pop up.
Here's the code:
target.addTag(tag);
system.runTimeout(() => {
if (target) {
target?.removeTag(tag);
}
}, ticks)
})```