Rotation System not Working With Drag Detectors

Hello, everyone!

Recently I’ve been working on a game that works like Jenga, and while I have most systems for base gameplay in place, I’ve encountered a problem.

I am using drag detectors that use the “TranslatePlaneOrLine” drag mode. I have one for every part in the tower, and I’ve incorporated an “R to rotate” system. However, the parts very quickly reset their rotation after I continue dragging the part. Below is the code that handles the system.

	RotateBrick.OnServerEvent:Connect(function(player, partToRotate: BasePart)
		if not partToRotate or not partToRotate:IsA("BasePart") then return end

		local currentOrientation = partToRotate.Orientation

		local newOrientation = Vector3.new(
			currentOrientation.X,
			currentOrientation.Y + 90,
			currentOrientation.Z
		)

		partToRotate.Orientation = newOrientation
	end)

That’s part of a ModuleScript if that changes anything. Furthermore, here’s a video that demonstrates the issue further:

Is this simply a drag detector quirk, or is this a problem with my code? Thanks, Citrus.

Hey Citrus, this is most likely a problem with the drag detector. As I am not very experienced with drag detectors, they tend to be a bit messy and bug out alot.

Okay, I’ll keep it unsolutioned in case someone else knows what might be going on. Thanks.