Rays and SpecialMeshes

Since meshes can be bigger than parts, I’m using a mesh for water. I want to make a raycast that checks if the water is in a certain range of the player. However, I am wondering it will only return true if the line is hitting the part. Or will it also work if it hits the mesh?

If it works with the mesh, than there’s a different problem in my script that I’ll have to deal with.

Yea it wouldn’t work with the mesh because its not inside of the part hitbox.

Ohhh. That’s what I thought. Anyway to fix this? Can I add the mesh to the whitelist?

Not that I know of, I don’t really use extended meshes.

You could go into blender, create a huge plane or long cube, and insert that into roblox as the ocean. Since it is still a basepart it is going to be hit by the ray.

1 Like