Discussion on the new Let block

The issue you are having is that all inputs are evaluated before the block is run. This can be fixed by changing the second input type to "any (unevaluated)" and calling it in the block:
untitled script pic (1)