PcoWSkbVqDnWTu_dm2ix

Experimental Mode

Experimental Mode

10 min

There are many legacy places and models that were created when “Experimental Mode” was available, but the setting has since been disabled. This article outlines some common design practices that will not work in the current Roblox architecture, along with ways to fix them.

Creating Parts

Sometimes a player action means new parts should be inserted into the game world. In Experimental Mode, a single LocalScript could create a new part, tell the server about it, and the server would update the other clients.

Again, this code worked fine in Experimental Mode, but now it will only spawn the car for the player locally — no other player be able to see or interact with it!

Moving Parts

Many player actions can cause parts to move. In most cases, such as a player’s character pushing or moving a part around, this automatically replicates to the server due to Articles/Network Ownership|network ownership. However, this doesn’t apply to anchored parts which are always owned by the server.

In the following example, buildings are moved around a grid map by clicking and dragging on them. In Experimental Mode, the player’s client could move a building and the server would automatically update to show all players the new placement.

With Experimental Mode disabled, only the player who’s dragging the building will see it move.

Server Manipulating Player’s Interface

Sometimes the server needs to update a player’s interface, like showing a popup menu. In Experimental Mode, the server could access the contents of the player’s PlayerGui and make changes. Consider the following example which displays a message to any player joining the game:

Without Experimental Mode, the player’s GUI is not visible to the server. Also, changing what’s shown in a player interface should generally be managed by the client itself.

Tools

Tool events fire on both the client and the server, so it’s important to remember the role of each when adapting an Experimental Mode game. Any LocalScript associated with a tool should be responsible for interface elements or local effects, along with player input. The server should be responsible for making changes to the game world, such as creating parts or changing game values.

The following example allows the tool user to create a sparkle effect on any other character that they click on. In Experimental Mode, this could be accomplished with just a LocalScript:

Without Experimental Mode, this effect will not be replicated to the server (or other clients) because it’s created locally.

Tags:
  • coding