Hello, I’ll keep this short, I’m trying to make a simple block placement system like the one found in “Build a Boat for Treasure.”
My problem is that the blocks only ‘stack’ on one face once they’re placed.
This is the grid snapping code snippet.
local function Snap()
PosX = math.floor(mouse.Hit.X / GridSize + SelectedBlock.Size.X/4) * GridSize
PosY = math.floor(mouse.Hit.Y + ghostpart.Size.Y/2)
PosZ = math.floor(mouse.Hit.Z / GridSize + SelectedBlock.Size.Z/4) * GridSize
end
I’ve never used math.floor
before, and maybe I’m just missing something really simple! Thanks for your time, have a great day!