Why is my block not firing its function?

I believe @12904 is referring to your indentation levels. Take a look at this topic I put up about formatting your code when requesting support, primarily the indentation one.

What do you expect to happen with your code? You say that your player is detected but how do you know this exactly.