Best way of going about detecting when a player steps on a tile (there are a lot of them)

I wanna detect when a player steps on a tile. I can either:

A. Raycast downwards from every player, constantly

B. Make 6250 .Touched connections

Which will be more performant?

A raycast downwards for every player is more performant. A short raycast has virtually no performance cost. Touched events are also less reliable in this case.

1 Like

I remember hearing that somewhere. Thank you!

https://developer.roblox.com/en-us/api-reference/event/Humanoid/Touched
Would only require a single concurrent connection (for each player).