I have no idea how i made this work but it works :) Btw you might have to drag the block twice for it to function.