Protected instances

Lock the parts of your place RoGenie must never delete or overwrite, what the lock covers and what it does not, the approval card, and how to remove protection. Being switched on in stages.

On this page

A protected instance is a hard lock on something in your place, such as a model, a folder of scripts or a whole system, that RoGenie's agent must not delete or overwrite. Telling RoGenie "don't touch my castle" is a request. Protection is a lock: the RoGenie plugin in Studio refuses the change, or undoes the step that made it, whatever the agent decides. That holds for what a step changes while it runs. Work the agent's code leaves running after its step is covered only in part (see What protection does not cover).

Note

Protected instances are rolling out in stages. If you don't see Protect from RoGenie in the IDE's explorer menu yet, or the Protect button in Studio says protection is not switched on, it is not switched on for your account.

Protect something

You can protect something in three ways:

  • In the web IDE, right-click the instance in the explorer (or select it and use ⋯) and choose Protect from RoGenie. A lock appears next to it. The things inside it show a faint lock: they are protected too.
  • In Studio, select the instances and use RoGenie: Protect selection, either the Protect button on the RoGenie toolbar or the action of the same name. You can bind the action to a shortcut in Studio's shortcut settings.
  • By asking RoGenie. "Protect my combat system" works: the agent can add protection, but no RoGenie tool lets it remove it. If code the agent ran takes protection off anyway, RoGenie puts it back (see Refused, or undone).

To protect the systems you already have, open the Protect menu in the IDE toolbar and choose Protect existing systems…. RoGenie lists the script systems in your script services (ServerScriptService, ReplicatedStorage, ReplicatedFirst, ServerStorage, StarterGui, StarterPack and StarterPlayer's script folders). You choose which to lock, and nothing is protected until you confirm.

Protecting something is its own step in Studio's undo history (Protect in RoGenie: …), so Ctrl+Z in Studio takes it back.

What protection blocks

While something is protected, RoGenie's tools refuse to:

  • delete it, or anything inside it,
  • move or rename it, or anything inside it,
  • edit a script inside it (script writes, script diffs, find and replace, the IDE's save),
  • change properties or attributes of it or of anything inside it through RoGenie's property, attribute and tag tools,
  • delete or move something that contains it, such as the folder it sits in,
  • remove its protection: no tool does it, a step whose code (run_lua included) takes it off is undone, and when code the agent left running takes it off later, RoGenie puts it back.

RoGenie may still read it and build next to it. By default it may also add new children to it. To lock that too, choose Lock new children too in the IDE's menu for the protected instance.

Refused, or undone

Most tools check protection before they change anything, and the call is refused with nothing changed. Code the agent runs with run_lua is checked after each step instead. If the step deleted or moved anything inside a protected instance, deleted, moved or renamed the protected instance itself, added children where they are locked, rewrote a protected script, or removed a protection, the plugin undoes the whole step (Studio cancels its undo recording) and reports what it tried to change. The rest of your place is untouched, and a world plan stops at that step.

An agent's undo that would change something protected is redone straight away. That includes undoing a child the agent added a step earlier: once added, it is part of the protected instance.

Code the agent runs can also leave work running after its step: a task.delay, a task.spawn thread that waits, an event it connects, or a RoGenie.job. That work changes your place outside every step, so there is no step to undo. If it takes the protection off something, or deletes a protected instance, while the agent is working or up to five minutes after its last step (longer while a RoGenie.job it started is still running), RoGenie:

  • puts the protection back at once, as its own Protect in RoGenie (put back): … step in Studio's undo history, or
  • for a deleted protected instance, which cannot be brought back that way, tells the agent on its next result, so it can tell you. Ctrl+Z in Studio usually brings it back.

Neither fails the agent's next step. If you take protection off yourself in one of the ways under Remove protection, nothing is put back.

The approval card

When a step in a run hits something protected, the run pauses and shows Let RoGenie change protected "…"?, with what the step tried to do:

OptionWhat happens
Allow onceThat one step goes ahead. The next change to it asks again.
Allow for this runChanges to it are allowed until this run ends. The next run asks again.
Keep protectedNothing changes. RoGenie is told to leave it alone and carry on.
✕ (close)Same as Keep protected.

Only you, the chat's owner, can answer the card. An unanswered card expires after 20 minutes and keeps the instance protected. Allowing a change never removes the protection: the instance stays protected after the step.

Note

Allowances are not saved. They last for one step or one run, and RoGenie forgets them if the server restarts. The next attempt then asks again.

Your own changes

Protection is a lock against the agent, not against you:

  • Edits you make in Studio yourself are never blocked.
  • An edit you make while the agent only looks at the place (a call that records no undo step), or while the web IDE reads it, never turns into a "protected" error. Typing in a protected script you have open in Studio's script editor never undoes the agent's step either.
  • In the web IDE, saving, renaming, moving or deleting something protected asks first: Change it anyway goes ahead once and the instance stays protected.
  • Reverting a turn can undo changes to protected instances, because you started it.

One overlap remains. If you delete, move or rename something inside a protected instance in Studio (in the Explorer, not the script editor) while one of the agent's steps is running, the plugin can't tell your change from the step's. That step may then be undone and reported as protected. Wait for the step to finish, or answer the card with Keep protected and carry on.

Remove protection

Only you can remove protection:

  • In the IDE, right-click the protected instance and choose Unprotect.
  • In Studio, select it and use RoGenie: Unprotect selection.
  • Or undo the Protect in RoGenie step in Studio, if it is still in the undo history.

Removing the RoGenieProtected tag by hand (in Studio's Tag Editor) also works, unless the agent is working or finished less than five minutes ago. Then RoGenie can't tell your change from code the agent left running, so it puts the protection back. Use one of the ways above instead.

Where protection lives

Protection is stored in your place, not on RoGenie's servers. It is the RoGenieProtected tag (CollectionService) plus a RoGenieProtected attribute you can see in the Properties panel; locked children add a RoGenieProtectChildren attribute. So protection:

  • is saved with the place file and survives closing and reopening Studio,
  • is visible to everyone who edits the place in Team Create. It protects the place from their RoGenie agent only when protection is switched on for their account and their Studio runs RoGenie plugin 1.1.152 or later. Otherwise their agent is not stopped by your lock: while protected instances roll out in stages, don't count on it in a shared place,
  • travels with a copy: duplicating a protected instance makes a protected copy.

RoGenie's servers keep only the allowances of a run, in memory. At the start of a chat RoGenie also tells the agent which instances are protected (at most 50 paths); like the rest of the chat's memory snapshot, that list is saved with the chat.

What protection does not cover

Protection is precise about what it covers. It does not cover:

  • Property changes made by code the agent runs (run_lua) on the instances inside a protected instance, renames included. Deleting, moving and script edits made during the step are caught; changing a part's color, position or name this way is not. (RoGenie's own property and rename tools are refused, as above.)
  • Work that code leaves running after its step: task.spawn, task.delay or task.defer threads that wait, event handlers it connects, and RoGenie.job jobs. RoGenie puts back protection that such work takes off and reports a protected instance it deletes (see Refused, or undone). It does not undo what that work changes or deletes inside a protected instance.
  • A protected script you have open in Studio's script editor, while a step runs. A change to its source then counts as your typing, even if the step's code made it.
  • Code written to get around the lock. run_lua code runs with the RoGenie plugin's own access to Studio, so code made to defeat protection on purpose can. Protection stops the agent's mistakes, not a deliberate attack.
  • Terrain voxels.
  • Scripts running in a playtest. A playtest runs in its own copy of the place.
  • Other plugins, and anything outside the RoGenie plugin.
  • Your own edits in Studio (see above).
  • Uploads to Roblox. See Publishing approvals.

Limits

LimitPer place
Protected roots (things you protected directly)50
Instances inside protected roots20,000
Scripts inside protected roots2,000

Protecting something past a limit is refused with the reason, and nothing changes. Instances inside a protected root count toward the limit, so protect the folder that holds a system rather than each piece of it.

Troubleshooting

  • "Protected instance: …" in a run. The agent tried to change something you protected. Answer the card, or unprotect it if you want RoGenie to work on it.
  • No Protect option in the IDE. Protection is not switched on for your account yet, or Studio runs an older RoGenie plugin. Restart Studio so the plugin updates.
  • A protected script I edited in Studio. That is your own change and is kept. RoGenie treats your version as the protected one from then on.
  • Protection came back after I removed it. You removed the tag or attribute by hand while the agent was working, or soon after. Use Unprotect in the IDE, or RoGenie: Unprotect selection in Studio.
  • Studio's undo history shows Protect in RoGenie (put back): …. Code the agent ran took the protection off after its step, and RoGenie put it back. The agent was told; ask it what it left running.
Back to top