Issue detecting part surface

Hey everyone. Making this post, because i need some help with this.

Is there any way to detect a surface of a part when clicking on it? I’m trying to create a build system. The current way i have done this is highly inefficient and bad. I’m using the :GetMouse() click function for my system. Is there any build-in function to detect the surface im clicking?

Help is highly appreciated!

1 Like

Could you show us your code?

We need to view your code so we can check if it’s highly inefficient and bad or if it’s good, I don’t think that your method is “highly inefficient and bad”, without your code we can’t give you a proper answer.

Hello. The method i used, was creating invisible parts all around the model, resembling the ‘surfaces’ Detected which part was clicked and then running the placement code on the position of the ‘part’

What’s the use-case? I know of one, but gotta make sure that it’s what you’re really asking for first.

So. I’m making a block building system, with using a 3x3x3 grid.

Figured this out already. Sorry for this. I just made a dumb mistake and i got it to work.

Then raycasting would be the best way to go about doing this as the function :FindPartOnRay among a few other values returns the direction (v3 unit) of the surface which the ray hit is facing. This can be used to for example make a building grid system, bullet holes, bullet ricocheting (yes I’m an fps guy) and much more.

1 Like

Hi! I know this topic is over a year old, but I was wondering, how were you able to figure out what face of a part the ray hit? I’ve been searching how to do it and very few results come up.