Beginner guide

Generate Your First Script

Use a simple, safe first prompt to create a Roblox Luau script and test it in Studio Play mode.

Updated July 16, 20263 min read

Guide

This page walks through a simple first script request for new NexusRBX AI users.

Choose A Simple First Script

Start with something low-risk, such as:

  • Printing a setup message.
  • Opening or closing a UI frame.
  • Making a simple sprint script.
  • Creating leaderstats for testing.

Avoid starting with player data, purchases, trading, moderation, or admin commands.

Example First Prompt

texttext
Create a beginner-friendly ServerScript for ServerScriptService. When a player joins, create leaderstats with Coins and Wins. Coins should start at 0 and Wins should start at 0. Include setup steps and how to test it in Play mode.

Review The Output

Before inserting the code, confirm:

CheckWhy it matters
Script type is ServerScriptLeaderstats should be created on the server.
Location is ServerScriptServiceThis is a normal place for server logic.
Object names match the promptTypos can make debugging harder.
The code is understandableYou should know what it does before publishing.
Test steps are includedYou need a way to confirm it works.

Insert Or Copy The Script

If NexusRBX AI provides an insert button, review any confirmation screen before accepting.

If you copy manually:

  1. 01

    In Roblox Studio, open ServerScriptService

    In Roblox Studio, open ServerScriptService.

  2. 02

    Insert a Script

    Insert a Script.

  3. 03

    Paste the generated code

    Paste the generated code.

  4. 04

    Name the script clearly, such as LeaderstatsSetup

    Name the script clearly, such as LeaderstatsSetup.

  5. 05

    Save your place

    Save your place.

Test In Play Mode

  1. 01

    Click Play

    Click Play.

  2. 02

    Wait for your character to load

    Wait for your character to load.

  3. 03

    Check the player list for Coins and Wins

    Check the player list for Coins and Wins.

  4. 04

    Open the Output window

    Open the Output window.

  5. 05

    Look for errors

    Look for errors.

If the values do not appear, ask:

texttext
Debug this ServerScript. It is inside ServerScriptService. It should create leaderstats with Coins and Wins, but the values are not appearing on the leaderboard. Here is the script and Output error: [PASTE SCRIPT AND ERROR HERE].
Spot something unclear?

Send the page title and link to support so the report reaches the right context.

Report an issue with this page