> ## Documentation Index
> Fetch the complete documentation index at: https://docs.virusstudio.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting Your Script – Virus Studio Support

> Diagnose and resolve common issues with scripts from Virus Studio, including runtime errors, unexpected behavior, performance problems, and broken edits.

Even well-written scripts can run into problems depending on your environment, configuration, or setup. This page walks you through the most common issues customers encounter after receiving a script and explains how to address each one. If you work through these steps and still can't resolve the problem, we're always available to help.

<Warning>
  Do **not** share passwords, API keys, tokens, or any other sensitive credentials when submitting a troubleshooting request. Redact or replace any sensitive values before sending code or error logs to us.
</Warning>

<AccordionGroup>
  <Accordion title="Script throws an error immediately on run">
    If your script produces an error the moment you run it, the most common causes are missing variables, uninitialized values, or `nil` references that the script expected to be set up beforehand.

    **Steps to try:**

    * Read the full error message carefully — it usually includes the file name and line number where the problem occurred.
    * Check that all required variables are defined before the script runs.
    * Look for any `nil` value warnings, which often indicate that an object, service, or dependency wasn't found.
    * Confirm that any external files, modules, or assets the script depends on are present and correctly named.

    If you contact us about this issue, **paste the full error message** along with your script. Partial errors or screenshots without context make diagnosis significantly slower.
  </Accordion>

  <Accordion title="Script runs but doesn't do what I expected">
    If the script executes without errors but the behavior doesn't match what you had in mind, the first thing to do is revisit your original request description.

    **Steps to try:**

    * Compare the script's behavior against the exact wording of your request. Scripting is implemented literally — if something was ambiguous in your description, it may have been interpreted differently than you intended.
    * Make a list of specific behaviors that are incorrect or missing, using clear, concrete terms (e.g., "the enemy should stop moving when health reaches zero" rather than "it doesn't work right").
    * Submit a revision request with your list of discrepancies. The more precisely you describe the gap between expected and actual behavior, the faster we can address it.

    See the [Revisions](/working-with-us/revisions) page for details on how the revision process works.
  </Accordion>

  <Accordion title="Roblox script works in Studio but not in the live game">
    This is one of the most common Roblox-specific issues and almost always comes down to the server/client boundary or FilteringEnabled behavior.

    **Steps to try:**

    * Determine whether your script runs on the **server** (Script), **client** (LocalScript), or both. Actions performed on the client are not automatically replicated to the server.
    * Check for any operations that require server authority — such as modifying character health, moving parts, or changing values in `workspace` — being run from a LocalScript without using `RemoteEvent` or `RemoteFunction` to communicate with the server.
    * Review the output window in Studio while running a **Play Solo** or **Team Test** session to see if additional errors appear in the live context.
    * If the issue involves player data or replication, confirm that your `RemoteEvent` and `RemoteFunction` instances exist in `ReplicatedStorage` and are referenced correctly on both sides.

    Contact us with a description of what works in Studio versus what fails in the live game, along with any relevant error output.
  </Accordion>

  <Accordion title="Python script fails with ModuleNotFoundError">
    A `ModuleNotFoundError` means Python can't locate a package that the script depends on. This is an environment issue, not a problem with the script itself.

    **Steps to try:**

    * Install the missing package using pip. For example, if the error says `No module named 'requests'`, run:
      ```
      pip install requests
      ```
    * If you're using a virtual environment, make sure it's activated before running the script or installing packages.
    * If multiple packages are missing, check whether the script came with a `requirements.txt` file. If so, install everything at once with:
      ```
      pip install -r requirements.txt
      ```
    * Confirm that you're running the script with the same Python interpreter that has your packages installed — mixing Python versions (e.g., `python` vs. `python3`) is a common cause of this problem.

    If you're still stuck after trying the above, contact us with the full error output and details about your Python version and environment.
  </Accordion>

  <Accordion title="Script runs slowly or causes lag">
    Performance issues can have several causes, including expensive operations running every frame, redundant loops, inefficient data lookups, or unoptimized rendering logic.

    **Steps to try:**

    * Check whether the slow behavior started immediately or developed over time. Gradual slowdowns often point to a memory leak or an accumulating loop.
    * In Roblox, use the **MicroProfiler** (`Ctrl+F6`) to identify which operations are consuming the most time per frame.
    * In Python, consider using the built-in `cProfile` module to profile your script and identify bottlenecks.
    * Avoid running expensive computations inside tight loops or `RunService.Heartbeat`/`RenderStepped` callbacks when they don't need to run every tick.

    If you need the script optimized, submit a performance revision request. Describe the specific lag symptoms — when it occurs, how severe it is, and on what hardware or platform — so we can target the right areas.
  </Accordion>

  <Accordion title="I modified the script and now it's broken">
    If you made changes to the delivered script and it stopped working, the fastest path to a resolution is to isolate exactly what changed.

    **Steps to try:**

    * **Revert to the original delivered version** of the script. This confirms whether the issue is with your modification or something else in your environment.
    * Once you've confirmed the original works, re-apply your changes one at a time, testing after each change to pinpoint which modification caused the problem.
    * Note down exactly what you changed — the line(s) you edited, added, or removed — before contacting us.

    When you reach out, include both the original delivered script and your modified version, along with a description of what you were trying to change and what error or behavior resulted. This gives us everything we need to help you quickly.
  </Accordion>
</AccordionGroup>

<CardGroup cols={2}>
  <Card title="Contact Us" icon="envelope" href="/support/contact">
    Couldn't resolve your issue? Get in touch and we'll help you sort it out.
  </Card>

  <Card title="Revisions" icon="rotate" href="/working-with-us/revisions">
    Learn how to submit a revision request if your script needs adjustments.
  </Card>
</CardGroup>
