why doesn’t this if statement run, it should because the print above prints the same number for both
try if tonumber(unit:GetAttribute(“Nation”) == tonumber(player:GetAttribute(“Nation”))) then
still doesnt work ------------------
sent print output message please
can you send the whole script?
no i cant ---------------------------
there is no need anyway, the problem is the if statement
very odd… I won’t be able to solve this problem without any more context. sorry.
I dont understand how giving you more of the script will help, it runs fine the if statement is the only problem
put a else in the if statement and print the numbers again, perhaps the attribute values are changing last second.
still doesn’t work, i put a print in the else and it prints
Remove the end before the else and put the end before else to see if that works…
the for i,v loop works it’s just the tonumber statement
Do it on the last “else” statement at the end of the script
I dont think you can do that? –
Based on the screenshot of the output, nothing prints out from that section of the entire for loop. (The lines do not match)
Try printing out a random string within the for loop itself, and see if it even prints, so to check if the for loop’s code even executes in the first place.
the I,V loop is fine, the if statement is the only problem (the tonumber one)