For some reason this script is causing my editor to crash. No idea why.
using UnityEngine;
using System.Collections;
public class killerlocationboop : MonoBehaviour {
public Vector3 newlocation=new Vector3();
Vector3 startlocation;
void Start(){
startlocation = rigidbody.position;
}
// Update is called once per frame
void Update () {
if (0 <=Time.timeSinceLevelLoad % 10 && Time.timeSinceLevelLoad % 10 <= 4) {
rigidbody.position = newlocation;
} else {
rigidbody.position = startlocation;
}
}
}