Hey guys im trying to make a weapon switching system by deactivateing and activating weapons i get this error error CS1525: Unexpected symbol `{’ and my code is:
public class WeaponSwitch : MonoBehaviour {
public GameObject ak47;
public GameObject sword;
void Start()
{
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1){
ak47.SetActive(true);
sword.SetActive(false);
}
if (Input.GetKeyDown(KeyCode.Alpha2){
ak47.SetActive(false);
sword.SetActive(true);
}
}
}