function ControlModule.SelectComputerMovementModule(F)if not(UserInputService.KeyboardEnabled or UserInputService.GamepadEnabled)then return nil,false end local y=nil local t=Players.LocalPlayer.DevComputerMovementMode if t==Enum.DevComputerMovementMode.UserChoice then y=computerInputTypeToModuleMap[lastInputType]if UserGameSettings.ComputerMovementMode==Enum.ComputerMovementMode.ClickToMove and y==Keyboard then y=ClickToMove end else y=movementEnumToModuleMap[t]if not y and t~=Enum.DevComputerMovementMode.Scriptable then warn("\078\111 \099\104\097\114\097\099\116\101\114 \099\111\110\116\114\111\108 \109\111\100\117\108\101 \105\115 \097\115\115\111\099\105\097\116\101\100 \119\105\116\104 \068\101\118\067\111\109\112\117\116\101\114\077\111\118\101\109\101\110\116\077\111\100\101 ",t)end end if y then return y,true elseif t==Enum.DevComputerMovementMode.Scriptable then return nil,true else return nil,false end end

function ControlModule:SelectComputerMovementModule()
	if not (UserInputService.KeyboardEnabled or UserInputService.GamepadEnabled) then
		return nil, false
	end
	
	local computerModule = nil
	local DevMovementMode = Players.LocalPlayer.DevComputerMovementMode
	
	if DevMovementMode == Enum.DevComputerMovementMode.UserChoice then
		computerModule = computerInputTypeToModuleMap[lastInputType]
		if UserGameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove and computerModule == Keyboard then
			-- User has ClickToMove set in Settings, prefer ClickToMove controller for keyboard and mouse lastInputTypes
			computerModule = ClickToMove
		end
	else
		-- Developer has selected a mode that must be used.
		computerModule = movementEnumToModuleMap[DevMovementMode]
		
		-- computerModule is expected to be nil here only when developer has selected Scriptable
		if (not computerModule) and DevMovementMode ~= Enum.DevComputerMovementMode.Scriptable then
			warn("No character control module is associated with DevComputerMovementMode ", DevMovementMode)
		end
	end
	
	if computerModule then
		return computerModule, true
	elseif DevMovementMode == Enum.DevComputerMovementMode.Scriptable then
		-- Special case where nil is returned and we actually want to set self.activeController to nil for Scriptable
		return nil, true
	else
		-- This case is for when computerModule is nil because of an error and no suitable control module could
		-- be found.
		return nil, false
	end
end
