using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Rotate : MonoBehaviour {

    public float rotationSpeed = 5;
    public Transform target;
	void Update ()
    {
        if(target == null)
        {
            Destroy(gameObject);
        }

        transform.position = target.position;
        transform.Rotate(Vector3.forward * rotationSpeed * Time.deltaTime);
	}
}
