Movement Handle goes yeet when I drag it

this should explain everything

here’s my code

script.Parent.MouseDrag:Connect(function(face, dis)
    if face.Name == "Top" then
        script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, dis, 0))
    end
    
    if face.Name == "Bottom" then
        script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, -dis, 0))
    end
    
    if face.Name == "Front" then
        script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, 0, -dis))
    end
    
    if face.Name == "Back" then
        script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(0, 0, dis))
    end
    
    if face.Name == "Left" then
        script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(dis, 0, 0))
    end

    if face.Name == "Right" then
        script.Parent.Adornee.Position = snap(script.Parent.Adornee.Position + Vector3.new(-dis, 0, 0))
    end
end)

function snap(vector)
    return Vector3.new(
        math.round(vector.X/1)*1,
        math.round(vector.Y/1)*1,
        math.round(vector.Z/1)*1
    )
end

it looks like cancer but ignore that for now

try understanding this thread’s solution it’s how i fixed my problem

1 Like

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