Hello, The first part of the code only works and it only works when I use the else statement when I change it to another stament it doenst work at all. This really doesnt make any sense. Im using unity now already for a few months and I have really no idea how I can fix this.
function Update () {
if (Input.GetKeyDown(KeyCode.Q))
{
SwapWeapons();
}
}
function SwapWeapons()
{
if (Geweer.active == true)
{
Verander = true;
HandWapenA = true;
Geweer.SetActiveRecursively(false);
Handwapen.SetActiveRecursively(true);
animation.Play("Hand");
}
else
{
Verander = false;
HandWapenA = false;
Geweer.SetActiveRecursively(true);
Handwapen.SetActiveRecursively(false);
//animation["Hand"].wrapMode = WrapMode.Once;
//animation["HandTwee"].wrapMode = WrapMode.ClampForever;
animation.Play("HandTwee");
}
}