Set boolean variables to default

You’re not executing the Cast (it needs to have the execution flow added to it after Add To Viewport and before your function).