How make drag objects witch mouse

Hello
I need help with my system
I’m trying to make a system that allows you to pick up items with the player’s mouse, the problem is that I can’t pick up items in the Y axis

Script:

local Player = game.Players.LocalPlayer
local Camera = workspace.CurrentCamera
local character = Player.Character or Player.CharacterAdded:Wait()
local Mouse = Player:GetMouse()

local Target
local Down

Mouse.Button1Down:Connect(function()
	if Mouse.Target ~= nil and Mouse.Target.Locked == false and Mouse.Target.Pickup.Value == true then
		
		Target = Mouse.Target
		Mouse.TargetFilter = Target
		Down = true		
	end
end)

Mouse.Move:Connect(function()
	if Down == true and Target ~= nil then 
		Target.Position = Mouse.Hit.Position 
		
	end 
end) 

Mouse.Button1Up:Connect(function()
	Down = false
	Mouse.TargetFilter = nil
	Target = nil
end)

I’m still going to make the maximum distance from the player

I’m using a translator

Can you show a video of your current code, and another video that shows what it is supposed to happen?

My system:

someone’s system:

The second video has a different code but similar, and I want to know how they can do it