Hi everyone,
i have simple script that instantiate array of objects, tag them to “spawn” and then destroys them after 20 seconds if there is no collision. If they collide with my main character, they become children and the tag changes into “picked”.
My problem is that even if tag changes, they get destroyed.
I used
- Destroy(gameObject.FindWithTag(“spawn”), 20);
I checked in the inspector panel, the object becomes a child, and tag changes into “picked”.
If it’s necessary i will post whole script.
Does anyone know what seems to be the problem?
Thanks