Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

scene.replace

Replace a loaded scene's content with another scene's content. The target scene keeps its identity (guid, name, place in the world); its files — scene.json, entrypoint.luau, everything else in the scene folder — become copies of the source's, and the scene reloads so the world reflects the swap immediately.

Takes the source scene (a scene name or a builtin identity such as @builtin::scenes.test_arena) and an opts table holding dryRun and scene.

Targets the active scene unless opts.scene names another loaded scene. Target content files the source doesn't have are removed; identity sidecars are untouched. dryRun = true reports exactly which files would be written and removed, plus the entities the source declares, without touching anything.