Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Quick Question how do i makr this snap to grid?

Asked by 5 years ago

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

0
I forgot how it feels like i should know it XD But somehow i have no idea i did ot before. Corrupt_Wolfstrik3r 51 — 5y
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. THEROBLOXAIN2 15 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
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

0
You can use this as a base TheMaleWhale_png 82 — 5y
Ad

Answer this question