private void Start() { uiapi = GameObject.Find("Canvas").GetComponent <UIAPI>(); rapidFire = false; uiapi.SetSliderMax(fireRate); //slider.maxValue = RespawnTime; uiapi.SetSlider(fireRate); //slider.value = RespawnTime; }