Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Quick Question how do i makr this snap to grid?

local posX,posY,posZ = mouse.hit.X, mouse.hit.Y, mouse.hit.Z mtarget.Position = Vector3.new(posX,posY,posZ)

2 comments

0

I forgot how it feels like i should know it XD But somehow i have no idea i did ot before.

0

https://www.roblox.com/games/2477160547/Placement-System-Working-UNCOPYLOCKED - Check this out. Idk if its filtering enabled but to me memory I was able to make it filtering enabled. Also check out the furniture placement system tutorial here.

1 answer

✓ Accepted answer
wait(3)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local part = Instance.new("Part",workspace) 
part.Anchored = true
mouse.Move:Connect(function()
	local posx = math.floor(mouse.Hit.X/3+0.5)*2 --3 is your gride
	local posz = math.floor(mouse.Hit.Z/3+0.5)*2 --3 is your gride
	part.Position = Vector3.new(posx,2,posz)
end)

I hope it helped you

1 comment

0

You can use this as a base

This discussion is preserved as it was. New answers, comments, and votes are closed.