Perhaps I was thinking too laterally here, but when challenged to prevent the NaN error, I initially thought of doing an “If” statement, then said “Nah, let’s KISS,” so I just went up to the where we defined our period and simply gave it a range
[SerializeField] [Range(.00001f, 1000f)] float period = 2f;
Which prevents it from going down to zero, but lets it go from blindingly fast to so slow you can’t really be sure it’s moving at all. And if I want to shut off the script, I just uncheck it, rather than having it running but doing nothing.
Am I being too basic here? Are there some unintended consequences of this I’m missing?
Every time I come up with one of these solutions that “does the thing” but not the way the teacher did it, I’m a bit nervous I might be breaking something down the line, as I’m such a code noob that I don’t even know what I don’t even know.