Touched-Ended Event Issues

Greetings. I am experiencing a difficult problem that is hard to think of a solution to. I went through developer-forum posts and found no solutions to my issue that solved it. I will explain the issue the best I can below.

What is your goal? When a player touches a zone, they will be put into a combative state. This combative state will be decided based on the part they touch.

What is your issue? The issue I am experiencing is whenever a players state changes to “falling” or they just jump in-general while in the combative-zone, the Touch-Ended event fires removing the combative state to then have the state re-enabled when they land. This causes UI’s to spam and overall can be very annoying and stressful on the server if a player is jumping a lot.

What is your hopeful solution? To have the issue resolved where the Touch-Ended event does not detect if they jump while in the combative-zone furthermore not removing their combative-state.

(Quick Note) I do use values to check if they are still in the zone and the issue still occurs.

Photo of issue occurring based on prints from the server:

You may want to use spatial query api’s instead since touch events can be innacurate sometimes, or a lot. I recommend you use @ForeverHD 's ZonePlus module as it was made for these types of zone manipulation uses

1 Like

Use a Region3 instead of .Touched .TouchEnded

This is also a good solution:

1 Like

I’m pretty sure some region3 method’s got deprecated in favor for the new spatial query api’s

Oh, didn’t even know. I’ll read into this.

It’s in here

1 Like

I never knew this existed and it worked, appreciate it!

1 Like

Thank you all for the helpful responses!