open a .fpe file for an animated character look at the bottom of the page where it says animation info or something like that go to the end of all that and make a new animation but name it next in line anima= 60 or whatever put the frames to your animation after that 30,40 ect whatever they are.......now make a .fpi script file with this in it
:state=0,plrdistwithin=60:animate=60,state=1
:state=1:timerstart,state=2
:state=2,timergreater=5000:state=0
This should make the hand come out of the ground every 5 sec provided that the plr is within 60 of the grave got it you can edit the anima= 60 to fit your needs and the plrdistwithin=60 to fit as well as the timergreater=5000 where 5000=5 sec
name your .fpi script gravehand and in your .fpe put gravehand in the main ai script portion
Wayne Davis Band