Interactive drawing boards in Roblox.
There are two components to install: the metaboard backend code, and a metaboard model to draw on.
You can find metaboard in Roblox Studio by searching "metaboard" in the Toolbox.
Double-click it to insert it (it will appear under Workspace
) and then move it to ServerScriptService
. This contains the Scripts,
LocalScripts and Guis for handling all metaboard interaction, which are automatically
distributed when you start your Roblox game.
You will need to manually update this file if you want the newest release.
Download the latest release. In Roblox Studio, right click on ServerScriptService
, click Insert from File
and insert the metaboard-v*.rbxmx
file. This contains the Scripts,
LocalScripts and Guis for handling all metaboard interaction, which are automatically
distributed when you start your Roblox game.
You will need to manually update this file if you want the newest release.
metauni maintains a few example boards you can use.
The easiest method to add these in Roblox Studio is to go to Toolbox > Marketplace
and search "metaboard".
- WhiteBoard
- BlackBoard
- TechBoard
- This is really two boards, both the
FrontBoard
andBackBoard
are tagged as metaboards.
- This is really two boards, both the
Don't be afraid to resize and stretch these boards as you please!
A metaboard can be either a BasePart
or a Model
with a PrimaryPart
.
To turn a BasePart
/Model
into a metaboard, use the Tag Editor
plugin to give it the tag "metaboard"
. Then add any of the following optional
values as children.
Object | Name | Value | Description |
---|---|---|---|
StringValue | Face | String (one of "Front" (default), "Back", "Left", "Right", "Top", "Bottom") |
The surface of the part that should be used as the board |
BoolValue | Clickable | Bool |
Set to false to prevent opening this board in the gui |
If the metaboard is a Model
, the PrimaryPart
should be set to the part which defines the drawing surface of the model (make sure the right Face : StringValue
is configured).
For more customised positioning of the board, make an invisible part for the board and size/position it on your model however you like (you should tag the parent model as the metaboard, not the invisible part, and remember to set the invisible part as the PrimaryPart
).
Any metaboard can be a subscriber of another board (the broadcaster), meaning anything that appears on the broadcaster board is replicated onto the subscriber board.
There are two ways of setting up this link
- Create a folder called "Subscribers" as a child of the broadcaster, then make an
ObjectValue
called "Subscriber" and set itsValue
to the subscriber. You can make any number of subscribers in this folder. - Create an
ObjectValue
under the subscriber called "SubscribedTo" and set itsValue
to the broadcaster. You can make any number of these to subscribe to multiple boards (they must all be called "SubscribedTo").
When you start your world, any links made with the second method will be converted according to use the first method.
Subscriber boards can have undefined behaviour, and can introduce performance strains if used liberally.
Any metaboard can be synced to a DataStore so that it retains its contents across server restarts. To enable persistence for a board, create an IntValue
under the board called "PersistId" and set it it to the subkey used to store the board contents.
Since persistent boards use the Roblox DataStore API there are several limitations you should be aware of:
-
In private servers the DataStore key for a board is of the form "ps:metaboard". Since keys for DataStores cannot exceed
50
characters in length, and player Ids are (currently) eight digits, that means that you should keepPersistId
's to30
digits or less. -
The DataStore keys for persistent boards are the same in any live server, and
SetAsync
is currently used rather thanUpdateAsync
, so there is a risk of data corruption if two players in different servers attempt to the use the "same" persistent board. We strongly recommend therefore that you reserve use of persistent boards to private servers. -
Persistent boards will be locked and only Clear allowed if the board reaches a threshold where it would exceed the storage requirement for the DataStore.
-
The
GetAsync
rate limit on DataStores has been handled by throttling the loading of persistent boards so that they never hit this limit (the throttling is conservative). -
Changed persistent boards are autosaved by default every
30sec
. -
On server shutdown there is a
30sec
hard limit, within which all boards which have changed after the last autosave must be saved if we are to avoid dataloss. Given thatSetAsync
has a rate limit of60 + numPlayers * 10
calls per minute, and assuming we can spend at most20sec
on boards, that means we can support at most20 + numPlayers * 3
changed boards since the last autosave if we are to avoid dataloss, purely due to rate limits. A full board costs about1.2sec
to save under adversarial conditions (i.e. many other full boards). So to be safe we can afford at most16
changed boards per autosave period.