So I want to rotate this cube...

in a game I want to rotate a cube. I wrote a script to rotate it but when it rotates the cube scales weirdly but still rotates.
Here’s my code, but whenever I rotate anything in the scene it also scales the same way.

using UnityEngine;
using System.Collections;

public class Rotate : MonoBehaviour {

// Update is called once per frame
void Update () {
	transform.Rotate (new Vector3 (45, 10, -100) * Time.deltaTime);


This happens because the father object of your cube has a transform scale different from 1,1,1 (2,2,2 3,3,3 … n,n,n)
if you want to prevent this you can just either:

-remove the cube from the father object

-create and empty gameObject that has a 1,1,1 world scale (I mean that when he has no parent the scale would be 1,1,1) then make it a child of “point/score” and then make the cube the child of the empty GameObject

-make sure the father object of the cube has a scale like 1,1,1 … n,n,n