I have a script that should only run at the start, and then after it’s done doing its thing, it should get disabled, since it has stuff in the Update method, and I don’t want it to keep running and clogging up the CPU.
Is there anything simpler than object and component references? Like a command that disables the script running the command?
That disables the whole object the script is attached to.
It would work if I attached it to an object, and removed that object. But I need to be able to re-enable the script, for stuff like respawning at the start.
nwm, I was trying to change something before, and I accidentally left a part of the code at targeting the object the script is attached to, whereas it was supposed to target something else.