We use cookies on this site to enhance your user experience

Network Simulation Mode

Network Simulation Mode

2 min

When building games in Roblox, it’s important to regularly test, particularly when the tests simulate sub-optimal conditions. The Network Simulation mode of Studio is designed to simulate poor connectivity so that games can be developed to handle players who have a bad connection.

Network Simulation mode does two things specifically. First, it simulates latency — a time delay when sending information over the network. Whenever a web call is made in Network Simulation mode, the call is delayed by a random time between 300 and 600 milliseconds.

The other simulation is random network failures. When web calls are made in Network Simulation mode, there is a 30% chance that the simulation will fail the call. If these calls are not encapsulated within pcall tags, the scripts running the code will error.

Enabling Network Simulation Mode

Network Simulation mode only works in the Local Server simulation of Studio. To enable it:

  1. Navigate to the Test tab in Studio.
  2. Ensure that Local Server is the selected mode.
  3. Click Start to launch new sessions of Studio (one for the server and one each for the configured number of players).
  4. In the new session for the server, click on the Network Simulator button. This will toggle the mode on. Clicking again will toggle the mode off.

NetworkSimulationToggle.PNG

When enabled, the Output window will show Network Simulator Enabled in its title bar.

NetworkSimulationEnabled.PNG

Services Affected by Network Simulation

Note that Network Simulation mode only applies to these specific Roblox services:

  • DataStoreService

  • MarketplaceService

  • HttpService

  • ContentProvider

  • GamePassService

  • InsertService

  • Players

  • AssetService

  • GroupService

  • PointsService

  • TeleportService

  • BadgeService

  • Chat

  • TextService

Tags:
  • network
  • optimization
  • performance