[Edit: Solved, a repeat until condition function was being used and the script got hung up on that]
So I’m not gonna post the functions since there is a ton of other stuff there connected to. But basically at the start when I run the game. Either “combat” or “order scan” is printed every 0.1 seconds.
After a while though nothing is printed. I don’t really understand how that’s possible since I never changed anything regarding the condition of the while loop.
This script is running in multiple NPC’s, in my case just a test of 5. Is there something that could cause these scripts to break? There was no errors.
while true do
wait(0.1)
if currTarget ~= nil then
print("combat")
combat()
elseif currTarget == nil then
print("order scan")
scanArea()
else
print("Nothing")
end
end