Hey i need help with my script:
I use it to make my Player teleport to new locations on a Button Click in the Ui.
But every time i move with my PLayer i get teleported to a new location, how can i make the location “static” so that they dont change everytime I mvoe with my player?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Teleport : MonoBehaviour
{
public GameObject Player;
public GameObject Standort;
public GameObject Standort2;
public GameObject Standort3;
public void tp()
{
Player.transform.position = Standort.transform.position;
}
public void tp2()
{
Player.transform.position = Standort2.transform.position;
}
public void tp3()
{
Player.transform.position = Standort3.transform.position;
}
}