using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Crouch : MonoBehaviour
{
public CharacterController characterController;
void Start()
{
characterController = GameObject.GetComponent<CharacterController>();
}
void Update()
{
if (Input.GetKey(KeyCode.LeftControl))
{
characterController.height = 1f;
}
else
{
characterController.height = 3.8f;
}
}
}
FPS Crouch script error, I have this script but it keeps giving me this error, Assets\Scripts\Crouch
How to report your problem productively in the Unity3D forums: