Issue with using :Resize()

Im trying to use :Resize() to resize parts using handles, it works normally, but I have an issue when the part collides with another part, causing it to change positions.

This is the code segment

scaleHandle.MouseDrag:Connect(function(face, d)
			
			if scaleHandle.Adornee.Size[surfaceAxis[face]] > min or d > 0 then
				part:Resize(face, -previousDistance)
				local distance = (math.floor(d/inc + .5) * inc)
				part:Resize(face, distance)
				previousDistance = distance
			end
		end)
		
		
		scaleHandle.MouseButton1Up:Connect(function(face)
			previousDistance = 0		
			--updateToActionLog
		end)

You could try to set canCollide false before the operation and after set it to true again, but idk if this is a fix for your problem. If you want it to stop at walls then you’ll have to do some hitbox checks with another hitbox part

I just got round to testing and it works.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.