# Player

### Parameters

#### name: string

The player's Roblox username

#### displayName: string

The player's Roblox display name

#### userId: number

The player's Roblox user ID

***

### Functions

#### getEntity(): [Entity](/scripting/bedwars-scripting/objects/entity.md) | nil

Returns the entity this player is controlling if one is active.

#### setScale(scale: number)

Resize player by provided multiplier. For example a `scale` of 2 would make the player twice as big (default player scale is 1).

#### registerSpeedMultiplier(id: string, multiplier: number)

Registers a speed multiplier for the player. A `multiplier` of 1 is equal to normal speed, less than 1 is slower than normal speed, and greater than 1 is faster than normal speed. A `multiplier` value of 2 would be equivalent to double the normal speed of the player.

The `id` parameter can be any string you wish to use to reference the multiplier.

#### registerAdditionalAirJumps(id: string, count: number)

Registers additional air jumps for the player. The default air jump count is 0. Air jumps are jumps performed while already in the air.

The `id` parameter can be any string you wish to use to reference the registered air jump change.

#### registerJumpHeightMultiplier(id: string, multiplier: number)

Registers a jump height multiplier for the player. A `multiplier` of 1 is equal to normal height (2 block high jump), less than 1 is shorter than normal height, and greater than 1 is higher than normal height. A `multiplier` value of 2 would be equivalent to double the normal jump height of the player.

The `id` parameter can be any string you wish to use to reference the multiplier.

#### removeSpeedMultiplier(id: string)

Removes the speed multiplier with the given `id` from the player.

#### removeAdditionalAirJumps(id: string)

Removes the additional air jumps with the given `id` from the player.

#### removeJumpHeightMultiplier(id: string)

Removes the jump height multiplier with the given `id` from the player.

Example usage:

```lua
-- Set all player speeds to 2 times normal speed for 30 seconds
-- Set all players to have 1 air jump
for i, player in ipairs(PlayerService.getPlayers()) do 
    player:registerSpeedMultiplier("speed-boost", 2)
    player:registerAdditionalAirJumps("bounce", 1)
    task.wait(30)
    player:removeSpeedMultiplier("speed-boost")
end
```


---

# 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.easy.gg/scripting/bedwars-scripting/objects/player.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.
