Making an actor destroy itself after a set value has been reached

it will soon be a multiplayer project. but for now im just trying to get it to work in single player. its a test project for now