'How to detect when a player touches and stops touching a part exactly?
To know when a player touches and stops touching a part we have the Touched and TouchEnded events respectively. The problem is that they are fired too many times. Applying the Debounce technique helps, but they are still fired more than once. Another problem is that sometimes Touched is fired more times than TouchEnded (or vice versa), especially when the player character keeps moving. I've also noticed that they are activated with character animations (with Idle animation for example).
Is there any way to use Touched and TouchEnded in an accurate way (that they are fired only once when the player touches or stops touching a part visually)? Or, if not possible, what would be a good alternative?
I am referring to an Anchored part and with CanCollide activated.
I also tried GetTouchingParts, but it doesn't work if the player character is on the part.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
