using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpinningLaser : MonoBehaviour { public float rotationSpeed = 100f; //rotation speed void Update() { transform.Rotate(0,0, rotationSpeed * Time.deltaTime); //rotating the object on the z-axis } }