Is there something I’m doing wrong? It was just working a couple of minutes ago but when I tried backtracking using ctrl + z it didn’t let me go all the way back and now nothing is being detected.
The alive and projectile object values are set by the way, this code is inside of a module script. Absolutely no errors by the way.
HitObject only works with parts, so use the InBox or InRadius SpatialOption, or just pass in a part, you can read about the SpatialOption param here.
Reason why this is the case is because if magnitude were to be used, the script would be looping through the entire workspace to figure out the distance of every BasePart in there, and that wouldn’t be too good.
Granted, later on I could add some way to only look through certain folders so it’ll only search in that if Magnitude has to be used.
I have NO clue what happened, but annoyingly the version I was working on disappeared even tho I published it? I can’t find it in the version history at all either, so I guess I’m going to have to restart everything and see if it’s working.
Not all, I still seem to have some stuff but I’ll see what I can do and if what you said works or not.