Unity 3D: When walking off of object character falls almost instantly

When jumping the falling is fine but if I just walk off of a cube the character falls instantly. Here’s my movement script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Control : MonoBehaviour
{
    public float moveSpeed;
    public float jumpForce;
    public CharacterController controller;
    private Vector3 moveDirection;
    public float gravityScale;

    // Start is called before the first frame update
    void Start()
    {
        controller = GetComponent<CharacterController>();
    }

    // Update is called once per frame
    void Update()
    {
       Input.GetAxis("Vertical") * moveSpeed);
        float yStore = moveDirection.y;
        moveDirection = (transform.forward * Input.GetAxis("Vertical") ) + (transform.right * Input.GetAxis("Horizontal"));
        moveDirection = moveDirection.normalized * moveSpeed;
        moveDirection.y = yStore;
        if (controller.isGrounded)
        {

            if (Input.GetButtonDown("Jump"))
            {
                moveDirection.y = jumpForce;
            }
        }
        moveDirection.y = moveDirection.y + (Physics.gravity.y * gravityScale * Time.deltaTime );
        controller.Move(moveDirection * Time.deltaTime);
    }
}

Change the gravity

I can see a moveDirection.y that is assigned as Physics.gravity.y * gravityScale

Physics.gravity.y should be something like -9.8 by default, so you’re multipling your gravityScale (I suppose it’s 1) for -9.8. And as it is in the update method you’re doing this multiplication about 60 times per second