Well I was doing a placement system and found that I couldn’t put things on the walls, I fixed that but I haven’t figured out how to replicate that on rotated walls
-- My mouse is based on raycasting, that's why the target surface and mouse hit are a Vector3 local function movePart() if mouse.Hit ~= nil then local X, Y, Z = mouse.Target.CFrame:ToEulerAnglesXYZ() local cf = (CFrame.new(mouse.Hit) * CFrame.Angles(X,Y,Z)) + (part.Size * mouse.TargetSurface / 2) part.CFrame = part.CFrame:Lerp(cf, 0.8) end end
The object rotation becomes the target orientation, but the object offset get’s glitchy
here’s an example
Does somebody have a clue of how do I fix it?