Make model switch animation with spotlight

So basically i have a model with 2 animations and i have a sit anim and stand anim and i want sit to be his idle anim and then after a random amount of seconds my model switches to stand anim and i dont want him to go back to the sit animation but i have a flashlight item which i want to be used so when my flashlight is pointed at him i want him to sit again but only when he is standing and then loop. Please make this possible for me please i beg for help