whats wrong (script) 2

hey guys i alredy asked for help with this script this is the script

function OnTriggerEnter (other : Collider) {
if( Input.GetKey( "f" ) )
{
audio.Play(03);
}

it will not play the music when im trigger enter but when i changed it to

function OnTriggerEnter (other : Collider) {
audio.Play(03);
}

and when i walk into it it automaticaly plays but i want to add the f key

i think you know what i mean can you help me

Please don't open multiple threads for the same question. Your other one is getting responses, stick with it. http://answers.unity3d.com/questions/52588/why-doesnt-audio-play-when-i-press-a-key-while-inside-a-trigger

1 Answer

1

if(Input.GetButtonDown(""))?