please dont treat this as a place for you to ask for code hint look into method teleport on player Player::teleport() also you have posted this in the wrong place