> For the complete documentation index, see [llms.txt](https://docs.giftoin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftoin.org/platform-guides/roblox/tools-and-scripts/rotating-script.md).

# Rotating Script

<figure><img src="/files/Q78tFsudqXBJj1pzU4qF" alt=""><figcaption></figcaption></figure>

```lua
local coin = script.Parent

local function rotate ()
	while true do
		coin.Orientation = coin.Orientation + Vector3.new(0, 3, 0)
		wait()
	end
end

rotate()

```

### How to Use:

1. Create a new Script in Roblox Studio.
2. Copy and paste the above code into the script.
3. Place the script as a child of the object you want to rotate.
4. The object will now rotate continuously around its Y-axis.

### Customization:

* To change the rotation speed or axis, modify the Vector3 values:
  * `Vector3.new(X, Y, Z)`:
    * X controls rotation around the X-axis
    * Y controls rotation around the Y-axis
    * Z controls rotation around the Z-axis
* Increase the numbers for faster rotation, decrease for slower rotation.

### Example Use Cases:

* Rotating coins or collectibles
* Creating spinning power-ups
* Animating decorative elements in your game world

\ <br>
