this should explain everything
here’s my code
script.Parent.MouseDrag:Connect(function(face, dis)
if face.Name == "Top" then
script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, dis, 0))
end
if face.Name == "Bottom" then
script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, -dis, 0))
end
if face.Name == "Front" then
script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, 0, -dis))
end
if face.Name == "Back" then
script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, 0, dis))
end
if face.Name == "Left" then
script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(dis, 0, 0))
end
if face.Name == "Right" then
script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(-dis, 0, 0))
end
end)
function snap(vector)
return Vector3.new(
math.round(vector.X/1)*1,
math.round(vector.Y/1)*1,
math.round(vector.Z/1)*1
)
end
it looks like cancer but ignore that for now