Need Help With A Mouse Crawling System

I want the mouse part to crawl up the player, and weld to the player and then the players movement is altered and he cannot walk straight kind of like ziggy zaggy and then after some time but not at the same time the mouse falls off the player.
Idk how I would make such a script escpecially the crawling up part can anyone help me

function GetClosestPlayerFromObject(object)
	local InRange = {}
	local MaxRange = 20

	for _, player in pairs(game.Players:GetPlayers()) do
		if (object.Position - player.Position).Magnitude <= MaxRange then
			table.insert(InRange, {Player = player, Range = (object.Position - player.Position).Magnitude}) -- Adds player

	table.sort(InRange, function(A,B) return A.Range < B.Range end) -- Change < to > if it's not ascending

	return InRange[1].Player -- Returns the closest player

while wait(1) do
	local ClosePlayer = GetClosestPlayerFromObject(script.Parent)
	if ClosePlayer.Humanoid then

I would first declare what speed you would want the crawl to be (in studs per second)
since youre looping the detection in 1 second intervals, i would adjust the expected position of the mouse to end up in by 1 second based on speed
then once it reaches the player initiate the zig zag script