# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.giftoin.org/platform-guides/roblox/tools-and-scripts/rotating-script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
