Part.Touched or spatial queries

Spatial Queries

Another place to learn more about the CanQuery property is in its announcement topic.


Touched event

  • Is only fired when two parts interact through physics simulations.
    • This means that manually adjusting the CFrame of a part or Tweening a part won’t activate the Touched event upon coming into contact with another part.

(For this example, let’s assume we have two parts: Part A and Part B )

  • If Part A is touched by Part B, BasePart.CanTouch has to be true for Part B or else the Touched event won’t be fired on Part A.

To be honest, I forgot that Raycasts were considered spatial queries. I mostly associated those with the OverlapParams from this announcement thread since that was the first time I’d really heard the term.

The original list I included of the spatial query operations was based on the CanQuery documentation page which didn’t include raycasting but I’ll be sure to add it to this post!

2 Likes