{
float timeLeft;
void start ()
{
timeLeft = Random.Range(5.0f, 10.0f);
}
void Update()
{
if (gameObject.GetComponent<Rigidbody>().isKinematic == false)
{
timeLeft -= Time.deltaTime;
if (timeLeft < 0)
{
Destroy(gameObject);
}
}
}
}
why wont the floats be applied to the timeLeft?