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
end)
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
end)
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.
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: