Can someone help me fix this code?

I’m trying to make it so that he will walk towards you unless you shine a light on him. When you do, he stops moving, and he stops his animation. But I can’t get it to work. Can ygs help?

Hey! I would be happy to help if the link was still functional. Could you please provide a working link so that the community can properly help you?

– Entity404

I have already fixed it, thank you anyway.