I’m trying to move a part with handles. I’ve noticed that handles are not very well documented or discussed on the DevForum, which makes it tricky for people like me who need to work with them.
I tried writing this script, but it is really buggy, poorly designed, and almost unusable for a regular player. Does anyone know how to fix the dragging or limit the speed at which the distance changes?
runService.RenderStepped:Connect(function()
if currentArrow and not currentArrowConnection then
currentArrowConnection = currentArrow.MouseDrag:Connect(function(face, distance)
local faceName
local newPos
if face == Enum.NormalId.Back then
newPos = currentCopy.Position + Vector3.new(0,0,distance)
currentCopy.Position = newPos
elseif face == Enum.NormalId.Bottom then
newPos = currentCopy.Position + Vector3.new(0,-distance,0)
currentCopy.Position = newPos
elseif face == Enum.NormalId.Top then
newPos = currentCopy.Position + Vector3.new(0,distance,0)
currentCopy.Position = newPos
elseif face == Enum.NormalId.Front then
newPos = currentCopy.Position + Vector3.new(0,0,-distance)
currentCopy.Position = newPos
elseif face == Enum.NormalId.Left then
newPos = currentCopy.Position + Vector3.new(-distance,0,0)
currentCopy.Position = newPos
elseif face == Enum.NormalId.Right then
newPos = currentCopy.Position + Vector3.new(distance,0,0)
currentCopy.Position = newPos
end
print(distance)
end)
end
end)
I made a video to show you how the part behaves when im dragging the handles