PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

Rotation

GuiObject

float

This property determines the number of degrees by which a GuiObject|GUI is rotated. Rotation is relative to the center of its parent GUI.

A GUI’s GuiObject/AnchorPoint does not influence it’s rotation. This means that you cannot change the center of rotation since it will always be in the center of the object.

Additionally, this property is not compatible with GuiObject/ClipsDescendants. If an ancestor (parent) object has ClipsDescendants enabled and this property is nonzero, then descendant GUI elements will not be clipped.


Code Samples


Spin GuiObject

This code sample rotates a parent GuiObject (such as a Frame) using a given rotation speed and the RunService/RenderStepped event.


Copycat Frame

This code sample shows how a UI element’s size, position and rotation can be copied without parenting a “copycat” to the original. It uses the Absolute-family of properties to orient a “copycat” Frame that covers on the screen space that the original does.