> For the complete documentation index, see [llms.txt](https://rocket-networking.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rocket-networking.gitbook.io/docs/rocket-networking-code/rooms/changeroom-new_room_name.md).

# ChangeRoom( new\_room\_name  )

## Description

This function removes your client from the room it is in to the new room in the argument. This is exactly the same as joining a room so join room / change room can be used interchangeably.

⚠️ The new room name **has to be a string**. Please understand that and do not pass any other values. That could severely crash your server and will have to restart. Room names are case sensitive and overall just really sensitive.  Also do not use emojis and other such characters. We 💕 emojis but they complicate code a lot.

📌 The new room name also **can’t be a numeric string like “3” , “234” “1010”**. This is because all private rooms are going to be numbers right? So we don’t want to join anyone’s private room.\
There is a workaround however. Instead of room id “67” you can put “ 67”. That extra space allows you to bypass this rule.

#### Syntax

```
ChangeRoom(new_room_name);
```

| Argument        | Description                                                                          |
| --------------- | ------------------------------------------------------------------------------------ |
| `new_room_name` | <p>The name of the room you intend the client to join.<br>This must be a String.</p> |

#### Returns

```
N/A
```

## What happens after I join this new room?

1. All instances of other players from your previous room, if there were any are destroyed, and now ones from this room are created.
2. Now your shared properties are only shared with members of this room.

## How do I know I’ve joined the new room successfully?

After a successful room change, the callback function **callback\_ChangeRoom()** is called.&#x20;


---

# 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://rocket-networking.gitbook.io/docs/rocket-networking-code/rooms/changeroom-new_room_name.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.
