I want to be able to detect what type of terrain a part is touching, kind of like how humanoid.FloorMaterial returns the material/terrain a player is touching.

What would be the best way of getting this done? I have seen some people suggest raycasting, but as I'm still pretty new to Roblox scripting I wanted to know if there is a simpler way.

1 comment

0

I think you might want to look at the wiki for Region3, that's how terrain is created, painted, removed, etc. during runtime.