Accessing FirsPersonController and CharacterController at the same time.

Hi, I am trying to write a small script for crouching. As my character crouches I want it to slow down. The problem I have is that after I declared this:

characterController = gameObject.GetComponent();

controller = gameObject.GetComponent();

I am not able to use them together. Both statements above won;t work together and my quetion is. What am I missing?
Cheers!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.FirstPerson;


public class Crouch : MonoBehaviour
{

    CharacterController characterController;
    FirstPersonController controller;

    // Use this for initialization
    void Start()
    {
        characterController = gameObject.GetComponent<CharacterController>();
        controller = gameObject.GetComponent<FirstPersonController>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey(KeyCode.LeftControl))
        {
            characterController.height = 1.0f;
            controller.m_WalkSpeed = 2;
        }
        else
         
            controller.m_WalkSpeed = 5;
            characterController.height = 1.8f;




    }
}

It’s not the missing braces around your else clause?

Otherwise we need more details. ‘Not working’ isn’t especially specific. Tell us what you want to happen, and tell us what is actually happening.

I confirm, silly me! Problem was caused by the missing braces around else for anyone wondering!

Cheers!