I'm not sure how to explain it but when in these games you have a sort of building tool you can only place it in a specific way, like the ROBLOX stamper tool. Are there literally invisible tiles or is there some fancy math going on?
✓ ANSWER ACCEPTED
How do people make 'tile' based tycoons/building in roblox?
1 answer
✓ Accepted answer
It's not magic
I just had to debunk that for you. You're welcome. What actually happens is that when they get your mouse hit position (mouse.Hit.p) they round off the X and Z axes. Here's an example implementation:
local function RoundTile(MousePosition, TileSize)
-- I've been using js too much recently I just tried to use {} for the function body.
local x,z = MousePostion.x, MousePosition.z
x = math.floor(x/TileSize + 0.5)*TileSize
z = math.floor(z/TileSize + 0.5)*TileSize
return Vector3.new(x, MousePosition.y, z);
end;
MousePositionis the position that the Mouse is pointing at (Mouse.Hit.p)TileSizeis the size of every tile. Simples. squeak
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
They use modulo and math.floor ect to round to the nearest sqware giveing a grid like effect