- Home /
respawn at current position
I am creating a simple game where a player jump from one box to another if the player fall from the box then the player will respawn its last position. I am using this script but it wont work
using UnityEngine; using System.Collections;
public class Testrun : MonoBehaviour {
void OnTriggerEnter(Collider other)
{
transform.position = new Vector3(3.0f, 5.0f, 0.0f);
}
}
pls help me to solve this out
Comment
What does not work? Trigger won't trigger? Spawn at different point? Please provide more information.
Your answer
![](https://koobas.hobune.stream/wayback/20220613162345im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Respawn Script 1 Answer
Respawn Problem 2 Answers
A node in a childnode? 1 Answer
Could you help me with my respawn script c# 2d engine 0 Answers
How to optimize boat rotation 1 Answer