Building going trough

How could i fix when placing the build clips trough like this:


CODE:

		local x = result.Position.X
		local y = nil
		local z = result.Position.Z
		if orix ~=  90 and orix  ~= -90 then
			y = result.Position.Y + _PLACEHOLDER:GetExtentsSize().Y/2
		else
			y = result.Position.Y
		end

		local pos = CFrame.new(x,y,z)
		local currentPivot = _PLACEHOLDER:GetPivot()
		_PLACEHOLDER:PivotTo(pos * CFrame.Angles(math.rad(orix),math.rad(oriy), math.rad(oriz)))
2 Likes