How to set waypoints?

If my player in the spawn(Point A)
and he went to Point B
and when he dies he re-spawn in Point A
how can i make he re-spawn in Point B if he reach it

Hello @fady217 !

We need more info in order to help you, what is the line code to respawn the player?

If i had to do it, i should use the Distance between the player and the point B, and if it is lower than 1 , replace spawnpoint in the respawn code for Point B.

float distance = Vector3.Distance(character.position, pointB.position;
 if (distance <=1)
SpawnPosition = pointB.position;

Give more info, post some code, if need more help, just ask using @tormentoarmagedoom !

If this helps, Upvote and Check as correct answer !

Bye! :smiley:

If he went to level 2 or 3 and he die
he re-spawn in level 1(the Spawn)
how can i make him re-spawn in the highest level he got :slight_smile: