Well basically I’m working on a fighting system, its literally done, but theres a small issue, so I inserted a script inside a string value inside an npc which whenever i hit, this string value will change to the player name and then the bot will follow this specefic player’s character and if it went too far away from the original position it will retreat, all this works perfectly fine although i’m running this on a while loop and I will obviously have many bots in the original game which means many while loops and i’m really scared from the lag it could cause.
Now many of you will say just use a local script but then I would need to fire a remote event each time i’m playing the animation, hitting, etc and that would be pretty much exploitable, would I need to leave it a while loop in a server script or is there a way to optimise it or does it even cause any lag in the first place?