How do I make a key appear?

ok so now a button appears when the player gets close, but now i’m trying to figure out how i can use “if, else” to make it disappear when the player gets too far away from it