Part keeps going in front of player camera

So this is my first time making a building system, and the part keeps going in front of my camera.
Heres my current code:

connection = RunService.Heartbeat:Connect(function()
	part.Position = clientMouse.Hit.Position
Also the connection gets disconnected once stopped.

It’s going to your camera because it’s repeatedly setting the part’s position to Mouse.Hit which is ON the part itself. You should add the part to the TargetFilter blacklist.

1 Like

So it work’s now but the problem is that it keeps going to the middle of the base, what would I do to fix this?

The middle of the basepart? You need to offset the part by a specific amount so that only the edge is touching the surface. There are multiple ways to do this, but probably the most common is using Raycast to find the surface normal of the part you’re looking at and use that to offset the part in a specific direction.

Questions on the forum regarding building systems are really common, if you have any other questions you should just look around for it on the forum.

Here’s a few threads and articles that can help: