Cannot rotate a triangle shape!

Ok a triangle has 3 sides right and I have formed up that triangle using 3 different game objects and each side is colored differently and the three different sides are under 1 parent game object , I will attach a picture for reference now what I want to do is when I hit an up arrow key the green side should rotate and be replaced by red and when I hit down arrow key green side should be replaced with blue but the triangle itself should not change the position98062-trio.png.

Hello @manikiran22 , If i understood right, you want to rotate the line on 3 different degrees(0, 120, 240) without positioning on script. First of all, you should position the parent gameObject to center of triangle.This will act like pivot point for the line. Also
You should get the rotation as a degree by eulerAngles, or just rotate it by Transform.Rotate