Quite vague, what're you wanting it to do exactly? You do know if you touch it, you touch it alot of times? I don't know of this would work...
HTML Code:
function onPlayerTouchsMe() {
this.ani = "walk";
cancelevents("onFinishTouch");
scheduleevent(0.2, "onFinishTouch", "");
}
function onFinishTouch() {
this.ani = "idle";
}
It will run "onFinishTouch" 0.2 seconds after the NPC was touched. Reduce time if needed- don't use it serverside (if possible)