Lesson 5 of 7

Plugins pros use, and writing your own

The Studio plugins professional Roblox developers use, from built-in tags and attributes to Archimedes, F3X, Moon Animator, Rojo and UI storybooks, how to check a plugin is safe, and an optional preview of writing your own.

Tool lesson, about 65 minutes, 8 steps

By the end you can

  • Use Studio's built-in tag and attribute editing, and explain what each does for code
  • Name the community plugins studios rely on for building, animation, sync and UI, and judge a plugin's safety before installing it
  • Know how a local Studio plugin is saved, reloaded and made undoable
  • Publish a plugin and share it free on the Creator Store, and know what selling one requires

Before this: Building by hand: Terrain, solid modeling, Toolbox licensing, Packages

1Stickers on a pad

Open m02-the-pad, select Workspace.Yard.CoinPads.Pad1 in Explorer (you do not even need to press Play), and scroll to the bottom of Properties. Two sections sit there: Tags, with one entry, CoinPad, and Attributes, with PadIndex = 1.

Neither one does anything by itself. A tag is a label that code can search for: "give me everything tagged CoinPad". An attribute is a named value you invent and attach to any instance. Studio lets you edit both by hand in Properties1; the old Tag Editor plugin became part of Studio in 20222.

Roblox Studio
Studio with a coin pad selected: the bottom of the Properties window shows a Tags section containing CoinPad and an Attributes section containing PadIndex.

Select a numbered pin, or a row below, to read what it marks.

Figure 1.1.

A coin pad selected in Properties. Tags and Attributes sit at the bottom.

Both sidesCollectionService tags is coloured stickers.
In the pictureIn Roblox
Putting a sticker onCollectionService:AddTag(instance, "Drone")
Asking for everything with a red dotCollectionService:GetTagged("Drone")
Checking one itemCollectionService:HasTag(instance, "Drone")

See the whole analogy cast

A tag is a coloured sticker. You can put the same sticker on as many things as you like, and any script can ask for "everything with a green sticker".

Think of it as Coloured stickers

Match each Beacon Yard need to the right tool.

  1. Find every coin pad at once
  2. Remember which number a pad is
  3. Store how many coins a coin is worth
  4. Let the wrench's ray see only drones
Answer

Find every coin pad at once: A CoinPad tag; Remember which number a pad is: A PadIndex attribute; Store how many coins a coin is worth: A CoinValue attribute; Let the wrench's ray see only drones: A Drone tag. Tags group instances for CollectionService queries. Attributes hold values. Beacon Yard uses CoinPad and Drone tags, and PadIndex and CoinValue attributes.

Open this step in lesson mode · Link to this step · This confused me

2A sticker that nobody reads

Later in the course, at m06-drone-wrench, here is the code that makes the Drone tag matter. The wrench's ray asks CollectionService for every instance carrying that tag:

Both sidesRemember: CollectionService tags is coloured stickers.

	local params = RaycastParams.new()
	params.FilterType = Enum.RaycastFilterType.Include
	params.FilterDescendantsInstances = CollectionService:GetTagged(DRONE_TAG)
 
	local result = workspace:Raycast(origin, direction.Unit * Config.WRENCH_RANGE, params)
Figure 2.1

Remove that filter line and the tag is still on the drone, doing nothing at all.

Attributes behave like properties you made up. Scripts set and read them, and they replicate from the server to clients:

Luau with roblox-lite (not Roblox)
-- Luau with roblox-lite: Instance and attributes, no Studio needed.
local pads = Instance.new("Folder")
pads.Name = "CoinPads"
for index = 1, 3 do
	local pad = Instance.new("Part")
	pad.Name = "Pad" .. index
	pad:SetAttribute("PadIndex", index)
	pad.Parent = pads
end
 
for _, pad in pads:GetChildren() do
	print(pad.Name, pad:GetAttribute("PadIndex"))
end
print("missing:", pads.Pad1:GetAttribute("CoinValue"))
Figure 2.2. Expected output: Pad1 1 Pad2 2 Pad3 3 missing: nil
Where does it break?“Coloured stickers” is a good picture of collectionservice tags. Where does it stop being true?

It breaks here. A sticker does nothing until code looks for it, and a tag on the drone's root does not tag its children.

The true model. A tag is a string stored on one instance and replicated from the server. Behaviour comes from the code that queries tags, which is why tags suit marking things for systems such as raycast filters, pads and pickups.

You tag a new crate "Drone" in Properties. What happens when a player swings the wrench at it?

  1. The ray can now hit it, because CombatService only lets the ray see Drone-tagged instances, and the hit damages the drone
  2. Nothing; tags never affect gameplay
  3. The crate turns into a drone
  4. Studio refuses the tag, because Drone is reserved
Answer

The ray can now hit it, because CombatService only lets the ray see Drone-tagged instances, and the hit damages the drone. The tag matters only because CombatService reads it: the ray includes every Drone-tagged instance. A hit on the crate counts as a drone hit, which is a bug. The sticker means whatever code decides it means.

CoinService reads the CoinValue attribute on each coin and falls back to Config.COIN_VALUE if it is missing. You select a coin during Play in server view and set CoinValue to 20. What happens when a player collects it?

  1. That coin pays 20, and the next coin the pad spawns pays 5 again
  2. Every coin pays 20 from now on
  3. The attribute is ignored, because only Config sets the value
  4. The player is paid twice
Answer

That coin pays 20, and the next coin the pad spawns pays 5 again. The attribute lives on that one coin. When it is collected and destroyed, the pad spawns a fresh coin whose CoinValue is Config.COIN_VALUE, 5, again.

Open this step in lesson mode · Link to this step · This confused me

3Plugins studios rely on

A plugin is a script that extends Studio itself: new buttons, windows and tools. You install them from the Creator Store through the Toolbox, and they appear on the Plugins tab3. These are the ones you will hear about in job posts and team chats:

  • Rojo: the sync plugin from the setup lessons. Every Rojo team has it.
  • Archimedes: builds smooth arcs and curves from parts, for round walls, bridges and tracks4.
  • Building Tools by F3X: an alternative set of move, resize, rotate and paint tools that many builders prefer for fast, precise work. It also exists as an in-game tool.
  • Moon Animator 2: a paid animation suite with a timeline editor, popular for cutscenes, camera moves and prop animation.
  • Hoarcekat and UI Labs: storybook plugins that preview a piece of UI code inside Studio without pressing Play, for teams writing UI with React-lua or Fusion56.

Previewing UI while you write it

OptionWhat it isWhen pros pick itTrade-offs
Press PlayRun the game and look at the screen.Small projects and UI built with plain Instances, like Beacon Yard's ShopGui.Every change costs a full test start, and reaching a deep menu takes clicks.
HoarcekatThe original storybook plugin: each story file mounts one component in a Studio panel.Long-running React (Roact) codebases that already have Hoarcekat stories.Older and simpler; fewer controls for props and no hot reload of its own.
UI LabsA newer storybook with hot reload, controls for changing props, and support for React, Fusion and Vide.Teams starting fresh with a declarative UI library.A community plugin with a smaller maintainer team; stories follow its own format.

Match each Beacon Yard job to the plugin a studio would reach for.

  1. A curved walkway around the beacon
  2. A camera fly-through of the yard for a trailer
  3. Previewing a React-lua shop panel without Play
  4. Syncing src/ into the place
Answer

A curved walkway around the beacon: Archimedes; A camera fly-through of the yard for a trailer: Moon Animator 2; Previewing a React-lua shop panel without Play: UI Labs; Syncing src/ into the place: Rojo. Archimedes makes arcs, Moon Animator handles camera and cutscene animation, UI Labs previews UI components and Rojo syncs files.

Open this step in lesson mode · Link to this step · This confused me

4Is this plugin safe?

A plugin runs with more power than a game script. It runs in Studio, on your computer, every time you open any place, and it can read and change everything in the place you have open, including your scripts. A malicious plugin can hide a backdoor in your game the same way a bad free model can, except it does it to every place you open.

Before you install one, check:

  1. Who made it. A known developer or studio, a DevForum thread with real discussion, and a long history beat a new account with a perfect description.
  2. Whether the source is public. Rojo, Hoarcekat and UI Labs are open source on GitHub; you or others can read what they do.
  3. What it asks for. Studio asks you before a plugin talks to a new web domain, and remembers your choice in Manage Plugins7. A building tool that wants to contact an unknown server is a red flag.
  4. Updates. A plugin can change with every update. Remove plugins you no longer use.
  5. Your place afterwards. After trying a new plugin, search your place for scripts you did not write.

Which of these are warning signs for a free "Ultimate Building Tools" plugin?

  1. It asks to send requests to a domain unrelated to building
  2. Its author's account is a week old and it has no discussion anywhere
  3. Its source is on GitHub with an open issue tracker
  4. After installing it, your place has a new Script you did not create
Answer

It asks to send requests to a domain unrelated to building; Its author's account is a week old and it has no discussion anywhere; After installing it, your place has a new Script you did not create. Unexplained web access, no track record and scripts appearing in your place are all red flags. Public source is a good sign, not a warning.

Open this step in lesson mode · Link to this step · This confused me

5How local plugins work (and an optional preview)

You have not taken the Luau module yet, so you do not need to write plugin code from scratch today. What matters in Module 1 is the workflow: any Script can become a local plugin in three steps3.

  1. Turn on Plugin Debugging Enabled in Studio Settings (Alt+S / Option+S).
  2. Put the script in ServerStorage, select it in Explorer, and choose Save as Local Plugin from Studio's top Plugins menu (or right-click the script in Explorer and choose Save as Local Plugin).
  3. Delete the original Script in ServerStorage. From then on, edit the copy under PluginDebugService, and right-click it for Save and Reload Plugin after each change.

Anything a plugin changes in your place should be undoable with Ctrl+Z (Cmd+Z), which plugins do by wrapping their edits in ChangeHistoryService:TryBeginRecording() and FinishRecording().

Go deeper Optional preview: write the Yard Ruler plugin (uses Module 2 Luau)

Come back to this block after Events, signals and the task library if you prefer to learn events first, or try it right now by building it up in three small parts.

  1. Create a toolbar button using Studio's built-in plugin global:
luau
local Selection = game:GetService("Selection")
local toolbar = plugin:CreateToolbar("Beacon Yard")
local button = toolbar:CreateButton("Yard Ruler", "Distance between two selected parts", "")
button.ClickableWhenViewportHidden = true
  1. Read the selected parts when the button is clicked, and warn if fewer than two parts are selected:
luau
button.Click:Connect(function()
	local selected = Selection:Get()
	local a, b = selected[1], selected[2]
	if not (a and b and a:IsA("BasePart") and b:IsA("BasePart")) then
		warn("[Yard Ruler] Select two parts first")
		return
	end
	local distance = (b.Position - a.Position).Magnitude
	print(string.format("[Yard Ruler] %s to %s: %.2f studs", a.Name, b.Name, distance))
end)
  1. Save and test: put both blocks together in one Script in ServerStorage, choose Plugins menu -> Save as Local Plugin, delete the original Script, then select Pad1 and Spawn in edit mode and click Yard Ruler on the Plugins tab.

Build along

m02-the-pad

  1. Open m02-the-pad in edit mode, select Workspace.Yard.CoinPads.Pad1, inspect its Tags and Attributes at the bottom of Properties, add a string attribute named Note, then delete Note.

    You should see Properties shows Tag CoinPad and Attribute PadIndex = 1 on Pad1; your temporary Note attribute appears and disappears when you delete it.

  2. If you want to try the preview above, enable plugin debugging, put the Yard Ruler code in a Script under ServerStorage, choose Save as Local Plugin from Studio's top Plugins menu, delete the Script from ServerStorage, select Pad1 and Spawn in edit mode, and press Yard Ruler.

    You should see Optional: a Beacon Yard section with a Yard Ruler button appears on the Plugins tab, and clicking it with Pad1 and Spawn selected prints [Yard Ruler] Pad1 to Spawn: 52.09 studs.

Open this step in lesson mode · Link to this step · This confused me

6Share the Yard Ruler on the Creator Store

A local plugin lives on one computer. Publish as Plugin uploads it to your inventory, so it follows you to every Studio you sign in to3. One more switch on the Creator Hub, Distribute on Creator Store, makes it public, free or for sale8.

Sharing has rules. Your account must be at least 2 days old, not recently banned, and verified with an age check or a government ID; a phone number does not count. Selling for US dollars needs a seller account on top: 18 or over (13 to 17 with a parent's consent), 2-Step Verification, a country the payments provider supports, and the asset owned by you, not a group. Only models and plugins can be sold.

The store also restricts code that loads other code at run time, such as require(assetId), loadstring and InsertService:LoadAsset, plus obfuscated scripts. That is the backdoor pattern from the safety step, banned for everything you share.

Build along

m02-the-pad

  1. Select your Yard Ruler script in Explorer (keep a copy under ServerStorage), choose Publish as Plugin from the Plugins menu, fill in Name and Description, and click Submit.

    You should see The Yard Ruler appears in the Toolbox under Inventory and Creations.

  2. On the Creator Hub, open Development Items, select the plugin, switch on Distribute on Creator Store in the Distribution section, leave the price at Free, and click Save Changes. If your account is not verified yet, stop here: the switch is refused, and that is the rule working.

    You should see The plugin's Configure page shows Distribute on Creator Store switched on and USD Pricing left at Free.

  3. Open the seller onboarding page linked from the Creator Store docs and compare it with the list above. Do not apply; this is to know the bar.

    You should see A short note lists each seller requirement and whether you meet it today.

For Yard Ruler 2, someone suggests loading the plugin's code with require(assetId), so you can update it without republishing. What happens on the Creator Store?

  1. It breaks the store's rules: requiring remote assets is a restricted practice, because the loaded code can change after review
  2. Nothing; plugins may load any code they like
  3. It is fine as long as the plugin is free
  4. It is fine if the module is public
Answer

It breaks the store's rules: requiring remote assets is a restricted practice, because the loaded code can change after review. Publish a new version instead. Users then run the code that was reviewed, and you keep the store's trust.

Open this step in lesson mode · Link to this step · This confused me

7Challenges

Level 2, Builder

Challenge

Optional preview challenge (or come back after Module 2): extend the Yard Ruler so it also tells you whether the two parts are within the coin pickup range.

Start from
The optional Yard Ruler plugin above, saved as a local plugin

Done means

  • Pressing the button with fewer than two parts selected warns instead of erroring
  • The printed distance also says whether it is within the coin's 12 studs
  • You reloaded the plugin with Save and Reload Plugin, not by reinstalling

Hints

  1. Compare distance with 12 and add "in coin range" or "out of range" to the message.
  2. Right-click the plugin under PluginDebugService for Save and Reload Plugin.

Level 3, Professional

Challenge

For this stretch challenge, start from m14-ship and use the Luau you learn in Module 2. In edit mode, select RulerA then RulerB and press the plugin button to make the mark. Press Play and run the check in the server command bar:

luau
game.ServerScriptService.RunGameTests:Invoke("studio-plugins")
Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("studio-plugins") in the server command bar. Copy the pass code from Output.

Done means

  • Workspace has parts named RulerA and RulerB at least 4 studs apart
  • Your plugin creates Workspace.RulerMark exactly halfway between them
  • RulerMark has a RulerDistance attribute equal to the distance, and is anchored with CanCollide off
  • Self-check, the test cannot see it: running the plugin again replaces the older RulerMark, and Ctrl+Z undoes the change

Hints

  1. a.Position:Lerp(b.Position, 0.5) is the midpoint; destroy any existing workspace:FindFirstChild("RulerMark") first.
  2. Wrap the insert in ChangeHistoryService:TryBeginRecording and FinishRecording.
Solution
luau
local recording = ChangeHistoryService:TryBeginRecording("Yard Ruler mark")
if recording then
	local old = workspace:FindFirstChild("RulerMark")
	if old then
		old:Destroy()
	end
	local mark = Instance.new("Part")
	mark.Name = "RulerMark"
	mark.Anchored = true
	mark.CanCollide = false
	mark.Size = Vector3.new(1, 1, 1)
	mark.Position = a.Position:Lerp(b.Position, 0.5)
	mark:SetAttribute("RulerDistance", distance)
	mark.Parent = workspace
	ChangeHistoryService:FinishRecording(recording, Enum.FinishRecordingOperation.Commit)
end

With the Yard Ruler, you select Pad1 at (22, 0, 0) and the shop at (28, 3, 28). To two decimal places, what does it print?

Answer

28.79 studs (within 0.01). The offset is (6, 3, 28): √(36 + 9 + 784) = √829 ≈ 28.79 studs.

Open this step in lesson mode · Link to this step · This confused me

8Recap

Recap

  1. Tags group instances for CollectionService and attributes hold values; Studio edits both in Properties, and neither does anything until code reads it.
  2. Studios rely on Rojo, Archimedes, F3X, Moon Animator and UI storybooks such as UI Labs or Hoarcekat; each plugin runs with full access to your place.
  3. Check a plugin's author, source, web requests and effects before trusting it; save local plugins from Studio's Plugins menu and reload them from PluginDebugService.
  4. Publish as Plugin puts a plugin in your inventory; Distribute on Creator Store shares it, which needs a verified account, and selling needs a seller account. Shared code must not load remote code.

CollectionService tags is coloured stickers, until a sticker does nothing until code looks for it, and a tag on the drone's root does not tag its children.

Next The data model: every service and where things live

Open this step in lesson mode · Link to this step · This confused me