hi i am working on a game where you scan switching between two objects you hold in your hand (shortl) and (loongl) and you should be able to switch between them by pressing the “F”
(that’s two flashlights just so you know)
I’ve created a script which changes from (shortl) by pressing the “F” but I can not change back again
any ideas?
#pragma strict
var shortl : GameObject;
var loongl : GameObject;
shortl.active = true;
loongl.active = false;
function Update () {
if (Input.GetKeyDown ("f"))
{
shortl.active = false;
loongl.active = true;
}
}