How to identify player is still touching a part despite lack of movement?
Asked by
6 years ago Edited 6 years ago
I created the following script:
01 | script.Parent.Transparency = 1 |
02 | script.Parent.CanCollide = true |
07 | script.Parent.CanCollide = false |
10 | script.Parent.Touched:connect(touch) |
I want to revert the CanCollide
property for the parent back to true
, but only when the player is no longer touching the parent. How can I do this? Apparently, the game identifies the player as no longer touching when they are not moving (even though they are still touching).
I tried adding the TouchEnded
event, and all it does is infinitely switch the CanCollide
property between true
and false
at a fast pace.