i made one that works. in this script, i create a timer that will shut the door automatically after 5 seconds. good in itself but i took out the plrdistfurther line. compare them side by side and youll see the difference.
;Artificial Intelligence Script
;Header
;done by mister shakes
desc = Key Door (Open 'With Key' and Close)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\lockeddoor.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=keydoorprompt,hudfadeout=keydoorprompt
:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff,timerstart
:state=2,plrhaskey=1:state=3,sound=$1
:state=3,timergreater=5000:decframe=0
:state=3,frameatstart=0:state=10,setframe=0,colon
;End of Script