Cant get object spinning on its axis with input

hi guys

i have a cube i reset

i have set the tool handles to pivot and local

and my script uses:

void Update()
    {
        transform.Rotate(Input.GetAxis("Vertical"), 0.0f, Input.GetAxis("Horizontal"));
    }

though my cube is rotating in the right directions, there is movement on it, so instead of rotating it rotates and moves to whatever direction its spinning, same with forward and backwards too.

Would appreciate any help on this, thanks

anybody? please

What sort of movement? If the cube is moving, something other than the code you posted must be moving it.

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

public class PlanePilot : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("plane pilot script added to: " + gameObject.name);
    }

    // Update is called once per frame
    void Update()
    {
        transform.Rotate(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal"), 0.0f);
    }
}

Thats the entire script, my cube wont spin on its access, it spins but moves to the side too, same with forward and backwards

When you look at the cube’s position value in the inspector are the numbers actually changing? Does the cube have a rigidbody or an animation/animator attached? Any other component?

No rigid body, nothing special, just a cube from objects set to 0 0 0

ok got it sorted, there was a demo script in the window that was attached to my object, deleted it, working perfect, thanks for your help!!!