Why is this needed ????/

Hi guys i just want to ask in the fps script what is the purpose of this line :

var controller = GetComponent(CharacterController);

thank you in advance :slight_smile:

It gets the components in the brackets. E.g:

var controller = GetComponent(CharacterController);

if(controller.isGrounded)
{
//Do something
}

with out that line it would not work, and it would come up with a error.

When you write that line you get access to all the CharacterControllers function(isGrounded and many more that I cannot think of right now).