Plugins · warning

Script or plugin script error breaking scenes

Lua/Python scripts or plugin scripts throw errors that break sources or hotkeys.

Last reviewed: 2026-08-06 · Source: OBS-Studio.net editorial diagnostics

Analyze a log

Matched symptom labels

  • Plugin-related crash

Overview

Lua/Python scripts or plugin scripts throw errors that break sources or hotkeys. This playbook is part of the plugin diagnostics family on OBS-Studio.net and focuses on concrete OBS Studio remediation rather than generic PC advice.

When you see symptoms matching Script or plugin script error breaking scenes, open Help → Log Files → Upload Current Log (or analyze a local log) and keep the Stats dock visible while reproducing. Note whether the problem is present in Preview only, Program output, a platform VOD, or a local recording. Those four observation points prevent chasing the wrong subsystem.

Work top-down: confirm OS permissions and device availability, then capture method, then scene complexity, then encoder capacity, then network delivery. Changing bitrate will not repair a black Game Capture hook, and reinstalling OBS will not repair a full disk. Each section below is written so you can apply fixes in order and stop when Stats and a short test recording look healthy.

Related OBS surfaces you will use repeatedly include Settings → Video (canvas, output, FPS, downscale filter), Settings → Output (encoder, rate control, recording format), Settings → Audio (devices and sample rate), source properties for Game/Display/Window Capture, Advanced Audio Properties for sync offsets and tracks, and the Stats dock counters for rendering lag, encoding lag, and network dropped frames.

If a plugin is in the blast radius, launch Safe Mode to prove stock OBS behavior, then reintroduce plugins one at a time. Keep scene collection backups before large rebuilds. Prefer MKV recordings with remux for crash-safe local files while you iterate.

Symptoms

Use this checklist against Script or plugin script error breaking scenes. Matching several items increases confidence you are in the right playbook.

  • Script log shows errors
  • Source goes missing after scene switch
  • Works after disabling Scripts

Also note what still works: mic versus desktop audio, Display Capture versus Game Capture, local recording versus live ingest, and whether Safe Mode changes the outcome. Those contrasts isolate hooks, permissions, encoders, and network paths quickly.

Fast checks

  1. Reproduce once with the Stats dock open and write down rendering lag, encoding lag / skipped frames, and network dropped frames.
  2. Create a 60-second local MKV recording of the failing scene to separate preview-only bugs from real output bugs.
  3. Toggle to a minimal scene with a Color Source only; if the issue vanishes, scene complexity or a specific source is implicated.
  4. For capture issues, A/B Game Capture, Window Capture, and Display Capture without changing encoder settings.
  5. For encode issues, switch temporarily to a hardware encoder or a faster x264 preset and retest the same scene.
  6. For network issues, lower bitrate 30% on Ethernet with dynamic bitrate enabled and compare dropped-frame counters.

These fast checks for Script or plugin script error breaking scenes usually identify the subsystem in under ten minutes before deeper repairs.

Likely causes

Common and occasional causes for this issue:

  • Script API mismatch after OBS update
  • Nil reference in Lua
  • Python environment broken

Do not assume a single cause. Multi-GPU laptops often combine affinity mistakes with Game Capture hooks; audio echo often combines Monitor and Output routing with open speakers; disconnects often combine Wi-Fi loss with an overly optimistic bitrate. Treat the list as a prioritized hypothesis set.

  • Script API mismatch after OBS update (common) — Documented cause for Script or plugin script error breaking scenes: Script API mismatch after OBS update
  • Nil reference in Lua (occasional) — Documented cause for Script or plugin script error breaking scenes: Nil reference in Lua
  • Python environment broken (occasional) — Documented cause for Script or plugin script error breaking scenes: Python environment broken

Detailed fixes

Apply repairs in order. Retest after each major change so you know which step helped.

  1. Step 1: Open Tools → Scripts and read the log
  2. Step 2: Disable scripts one by one
  3. Step 3: Update scripts for your OBS version
  4. Step 4: Remove abandoned scripts from the scene collection

After the primary fixes, remove temporary test changes you no longer need, document the final encoder and capture settings that worked, and keep a known-good scene collection backup. If nothing above moves Stats in the right direction, capture a fresh log during a failure window for pattern matching.

  1. Repair: Open Tools → Scripts and read the log

    Open Tools → Scripts and read the log

    Retest the original trigger for Script or plugin script error breaking scenes before continuing to the next repair step.

    Change one major variable at a time and keep a scene collection backup.

  2. Repair: Disable scripts one by one

    Disable scripts one by one

    Retest the original trigger for Script or plugin script error breaking scenes before continuing to the next repair step.

  3. Repair: Update scripts for your OBS version

    Update scripts for your OBS version

    Retest the original trigger for Script or plugin script error breaking scenes before continuing to the next repair step.

Verification

  • Stats counters that were elevated for this issue trend toward zero during a five-minute stress test.
  • A local MKV recording reviewed in a player shows correct video and audio sync for the failing scenario.
  • If this was a live issue, a platform preview or VOD confirms the repair beyond OBS preview.
  • Safe Mode versus normal mode behave consistently after plugin cleanup (when plugins were involved).
  • Reboot once and re-verify; some permission and driver changes only stick after a clean relaunch.

Verification for Script or plugin script error breaking scenes is not complete until you reproduce the original trigger (game launch, alert spam, long session, Wi-Fi idle, etc.) without regression.

  1. Verify Stats and output for Script or plugin script error breaking scenes

    Run a five-minute reproduction with Stats visible. Confirm the counters associated with this issue improved, then review a local MKV and/or platform preview.

Rollback

  1. Rollback experimental changes for Script or plugin script error breaking scenes

    If a test change made things worse, restore the previous encoder preset, capture method, or audio routing from your notes or scene collection backup. Remove temporary exclusions or admin elevation that were only for testing.

Common mistakes

  • Raising bitrate to “fix” encoder overload or rendering lag.
  • Reinstalling OBS repeatedly without isolating plugins via Safe Mode.
  • Running everything as Administrator permanently on Windows without a documented need.
  • Chasing preview artifacts when Program/VOD output was already correct (or the reverse).
  • Ignoring disk free space and antivirus locks while debugging “corrupt” recordings.
  • Pasting stream keys into public screenshots or unredacted logs.

Avoid shotgun changes. Change one variable at a time for Script or plugin script error breaking scenes so the working configuration is reproducible.

Operating-system notes

Scripting availability differs slightly by OS build; errors are visible in the Scripts dialog.

Regardless of OS, keep GPU drivers current from the vendor, prefer wired networking for live output, standardize audio on 48 kHz when possible, and treat permissions prompts as first-class failures rather than background noise.

Version notes

These guidance notes target current OBS Studio feature surfaces (Stats docks, Safe Mode, MKV remux, Browser Source shutdown-when-not-visible, hardware encoders, and PipeWire capture where applicable). If you are on a significantly older OBS build, update before deep troubleshooting—plugin ABIs and encoder UIs change across major versions.

After updating OBS, reinstall or update third-party plugins to builds that explicitly support your new version. Legacy encoder plugins are a frequent source of duplicate NVENC entries and init crashes.

FAQ

Safe Mode disable scripts?

Safe Mode focuses on plugins; still disable scripts manually when isolating.

Can scripts cause encode lag?

Busy polling scripts can waste CPU—profile them.

Related problems

Was this helpful?