Transform.localScale simply not working

Hello!

I have read at least 8 or so threads about this and absolutely nothing worked. I am simply trying to scale down a monster to simulate distance, but it won’t work no matter what. It’s a 2D game. Here is my code:

GameObject newCreature = new GameObject();     
                                        
newCreature = Instantiate(monsterGrimorium.GetPrefab("Orc"));

Vector3 scale = newCreature.transform.localScale;
scale.Set(0.150f, 0.150f, 1.0f);
newCreature.transform.localScale = scale;

Why is this not working? I tried as many variations as I could think, including modifying the x and y values directly.

Thanks a lot!

Does your prefab have an animation attached?

No animations of any kind! A Sprite Renderer, Rigidbody2D, Box Collider 2D, Audio Source and a Creature script with behavior, etc.

EDIT: I have solved it! Please excuse me, I got my algorithm completely wrong and due to other reasons the scale was working, but simply not showing. Thanks!