Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class KillPlayer : MonoBehaviour
- {
- public GameObject player;
- public Transform respawnPoint;
- void Start()
- {
- }
- void Update()
- {
- }
- private void OnCollisionEnter(Collision other)
- {
- if(other.gameObject.CompareTag("Player"))
- {
- Scene currentScene = SceneManager.GetActiveScene();
- SceneManager.LoadScene(currentScene.name);
- //player.transform.position = respawnPoint.position;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement