> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/services/modelservice.md).

# ModelService

Example usage:

```lua
-- Create a beachball above all iron blocks
local ironBlocks = BlockService.getAllBlocks({ ItemType.IRON_BLOCK })
for i, block in ipairs(ironBlocks) do
    local positionAbove = block.position + Vector3.new(0, 3, 0)
    local beachball = ModelService.createModel(ModelType.BEACHBALL, positionAbove)
    beachball:setAnchored(false)
    beachball:setCollidable(true)
    beachball:setScale(0.75)
end
```

### Functions

#### createModel(modelType: [ModelType](/scripting/bedwars-scripting/types/modeltype.md), position: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)): [Model](/scripting/bedwars-scripting/objects/model.md)

Creates a model of the given name at the specified position. You can further customize and give functionality to it using the returned [Model](/scripting/bedwars-scripting/objects/model.md) object.

BedWars models available for use are contained in the [ModelType](/scripting/bedwars-scripting/types/modeltype.md) list.

#### createItemModel(itemType: [ItemType](/scripting/bedwars-scripting/types/itemtype.md), position: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)): [Model](/scripting/bedwars-scripting/objects/model.md)

Creates a model of the given ItemType at the specified position. You can further customize and give functionality to it using the returned [Model](/scripting/bedwars-scripting/objects/model.md) object. Note that some items do not have unique item models.

Example usage:

```lua
Events.BlockPlace(function(event)
    if (event.blockType ~= ItemType.STONE_BRICK) then
        return
    end    

    local model = ModelService.createItemModel(ItemType.RAGEBLADE, event.position + Vector3.new(0,4,0))
    model:setScale(1.2)
    model:setRotation(Vector3.new(0,90,0))
end)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.easy.gg/scripting/bedwars-scripting/services/modelservice.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
