Hello, I've been attemping to make a placement system that sort of emulates the Stamper Tool's placement. Everytime I've attempted it, I've gotten the overall premise down but it doesn't seem to work properly or work as I would like it to.
My current version, works perfectly fine, but the blocks aren't being positioned correctly, if you place down one block, and try to put another one on the side of that block, it'll go inside rather than going to the side.
Same thing applies for models.
Here is how the position is determined currently.
local grid = 4
local function RoundToNearest(ToRound, Increment)
return floor(ToRound / Increment + 0.5) * Increment
end
local function snap()
local positon = mouse.Hit.p
return CFrame.new(RoundToNearest(positon.X, grid), RoundToNearest(positon.Y, grid) + 2, RoundToNearest(positon.Z, grid))
end
My question is, how would I edit my current code or make a placement system without raycasting that would allow me to place blocks on all faces of another block freely?

1 comment
I'm pretty sure this wouldnt work with models. Any other methods?