Refactored SpawnPlayer into SpawnObject