Watched a tutorial on crouch script I don’t know we its not working heres the script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class crouch : MonoBehaviour
{
CharacterController characterCollider;
// Start is called before the first frame update
void Start()
{
characterCollider = gameObject.GetComponent ();
}
// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.LeftControl) ) {
characterCollider.height = 1.0f;
}
else
{
characterCollider.height = 3.8f;
}
}
}
What do you want the script to do? What is it doing instead? The only thing CharacterController.height changes is the height of the character’s capsule collider: Unity - Scripting API: CharacterController.height
So I found your tutorial (I think). It’s important to note that this tutorial starts with the Standard Asset FPSController asset. Are you using that asset?