I am making a game where the player can spawn a certain object, but I don't want the player to have more than x amount of that object at a given time. I can't figure out how to destroy said object if it exceeds x amount, or prevent the player entirely from spawning more than x amount. Would appreciate any help on this matter.