PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Oct 11 2018, 1:44 PM PST 5 min

It’s not always possible to write functional scripts the first time, or even figure out the problem by looking at them. Sometimes you need to “debug” a script by using techniques and tools which provide more information about what went wrong.

Output Window

The Output window is one of the most powerful debugging tools. It displays any errors captured from running scripts, messages from Roblox game code, and user-defined messages and errors. It can be useful to include print() calls at key places in your scripts so you can see messages in the Output window.

To open the Output window in Studio, click on the View tab and then on Output.

Lua Debugger

Like most IDEs, Roblox Studio includes a Articles/Lua debugger you can use to pause a script so you can inspect it while it is running. This allows you to stop a script at specific points and run it step by step to see how it behaves.

Command Bar

The Command Bar in Studio provides a powerful debugging tool. It allows you to test out possible script commands and to make adjustments to the game while it’s running.

Explorer/Properties

The Explorer and Properties windows can be used in Studio to see what objects exist at a given time. This can help you see if certain properties were inadvertently changed by a script.

Log Files

Whenever a script running on your computer prints or has an error, that message is recorded in a log file. These files are located in different places depending on the operating system:

  • On Windows, type %LOCALAPPDATA%\Roblox\logs into the file explorer address bar and then sort the folder by date modified. Logs should have the format log_XXXXX followed by additional naming. All logs with the same XXXXX value are from the same Studio session.
  • On macOS, logs are in the directory ~/Library/Logs/Roblox. In the Finder, click the Go menu, select Go to Folder, type in that directory, and confirm.
Tags:
  • bugs
  • help