How to check if there is a part in front of my part

Basically the title, I want to check if there is a part at a certain vector3 location. I havent seen anything that can help me do that.

You would use an if statement to check if the parts position is in front of the player. I think this should work:

if part1.Position == Vector3.new(part2.Position.X, part2.Position.Y, part2.Position.Z) then

This would only detect if part1 has the exact position as part2, I believe he is asking if there is a way to detect if a part is in front of another part, in that case I would use Rayasting

Then they can take the same code and add +1 to the Part2.Position.X.

if part1.Position == Vector3.new(part2.Position.X +1, part2.Position.Y, part2.Position.Z) then

Ah i see either way he found the solution

1 Like

I used GetPartInBoundsBox or something like that