I have a crafting script, that works by clicking a button to open the GUI crafting menu, and then while the menu is open the names of the parts you click go into the menu and you can then craft them, but for some reason the function onMouseMove(mouse) isn't connecting to the main onMouseButton1Down(mouse) function. The main function works because it opens the menu correctly but I put: print("mousemove") in the onMouseMove(mouse) function to see if the function is even connecting but it didn't print anything so apparently its not even connecting. Did I make an error? this is only part of the script, its a 1000+ line script so I didn't want to put the whole thing. Let me know if you have any questions. Thanks!

--MOUSE FUNCTIONS
function onMouseMove(mouse)
	local targ = mouse.Target
	
	print("mousemove")
	if CHOOSING then return print("choosing")end
	
	TARGET_LABEL.Text = ""

	if canUse(targ) then
		TARGET_LABEL.Text = targ.Name
	end
end

function onButton1Down(mouse)
	if CHOOSING then return end

	local targ = mouse.Target

	if canUse(targ) then
		if not haveCheck(targ) then
			selectTarget(targ)
		else
			alert("You already have that!")
		end
	end
end

function selectTarget(part)
	alert(part.Name.." selected")

	table.insert(SELECTED, part)

	updateList()
end

--SELECTION FUNCTIONS
function onMouseButton1Down(mouse)
	local player, char = getPC()
	local pg = player.PlayerGui
	local player = game.Players.LocalPlayer
	local p_gui = player.PlayerGui
	local Bpack = player.Backpack
	
	CFRAME.Visible = (not CFRAME.Visible)
	while CFRAME.Visible == true do 
		wait(3)
		local CHOOSING = true print("choosing is true")
	end
	
	mouse.Move:connect(function()onMouseMove(mouse)
	end)

	mouse.Button1Down:connect(function()onButton1Down(mouse)
	end)
	
	if CFRAME.Visible == false then stopCreationChoice()print("CC stopped")
	end
	end

--CONNECTIONS
CBUTTON.MouseButton1Down:connect(onMouseButton1Down)

CLEAR_BUTTON.MouseButton1Down:connect(clearSelected)
ITEM_BUTTON.MouseButton1Down:connect(createItem)
TOOL_BUTTON.MouseButton1Down:connect(createTool)
PROCESS_BUTTON.MouseButton1Down:connect(processItem)