I found the problem I was having. Because the task is using the system account it was hanging on part of the script that was seeing if a network drive existed.
code:
 $Selection = MessageBox("This PC Needs to be logged out. Please save your work and log off. Would you like to log off now?","Time to Logoff",36, 15)
If $Selection = 6
LogOff(0)
Endif
If $Selection = -1
LogOff(0)
Endif

Does anyone know how I can prevent this from running if no one's logged in to the PC without looking at the network?