My script doesnt work. Whats wron?

Here you got a look of my own script:

function OnTriggerEnter(){
if (Input.KeyCode.F);
Application.LoadLevel("carshop");
}

The problem is that the leveldoesn’t load or the game doesn’t know when the key is pressed.

You need to use OnTriggerStay to check continuously while you’re in the trigger area. You need your if() statement opened and closed with brackets, no semicolon. If you’re wanting only to instruct the trigger with your player, check the collider within the trigger’s area. Use Input.GetKeyDown to check your Keycode.

function OnTriggerStay(other : Collider)
{
    if(other.tag == "Player")
    {
        if(Input.GetKeyDown(KeyCode.F))
        {
            Application.LoadLevel("carshop");
        }
    }
}

We didn’t get very far from this

Put that in update(), you won’t capture a keypress during the milisecond ontriggerenter is running. Please look at the tutorials.