I have no idea how Handles work for moving objects. I used some code I found in a couple of other places on the devforum, but it looks like information relating to how to use Handles is very limited.
This is what ends up happening: 2023-09-19 21-29-58 (the orientation issue I know how to solve - just trying to figure out how to make it move properly)
Basically, it just seems to exponentially calculate the distance at which the object is supposed to move.
Here’s my modified version of the code I’ve found on the devforum before:
script.Parent.MouseDrag:Connect(function(face, distance)
local Object = script.Parent.Adornee.Parent
local newPos
print(face)
if face == Enum.NormalId.Back then
newPos = Object.PrimaryPart.Position + Vector3.new(0,0,distance)
Object:PivotTo(CFrame.new(newPos))
elseif face == Enum.NormalId.Bottom then
newPos = Object.PrimaryPart.Position + Vector3.new(0,-distance,0)
Object:PivotTo(CFrame.new(newPos))
elseif face == Enum.NormalId.Front then
newPos = Object.PrimaryPart.Position + Vector3.new(0,0,-distance)
Object:PivotTo(CFrame.new(newPos))
elseif face == Enum.NormalId.Left then
newPos = Object.PrimaryPart.Position + Vector3.new(-distance,0,0)
Object:PivotTo(CFrame.new(newPos))
elseif face == Enum.NormalId.Right then
newPos = Object.PrimaryPart.Position + Vector3.new(distance,0,0)
Object:PivotTo(CFrame.new(newPos))
end
end)
Any help would be appreciated! Thanks in advance, folks.