The art museum is created from a collection of scripts stored in various places in Roblox. You will need to create and install these scripts in your Roblox world in order to see the Art Museum.
ReplicatedStorage
The following scripts need to be added to your ReplicatedStorage area:
genericShapes (genericShapes-ModuleScript.htm) This module creates the generic shapes used in the art museum.
mazeGenerator (mazeGenerator-ModuleScript.htm) This module will generate the maze used in the Museum.
artInstallationRoom (artInstallationRoom-ModuleScript.htm) This module installs the art in a room and coordinates where the room is located in the museum.
studentExhibition (studentExhibition-ModuleScript.htm) This module creates the student art exhibits and processes any animations once installed in a room.
Baseplate Scripts
The baseplate is loaded when the Roblox world is started. The baseplate may have a Script associated with it. The name of this script should be: baseplateScript and it should be a "Script" added to the baseplate of your Roblox world. Below are a few examples of baseplateScript content to enable you to experiment with different possibilities for coding art exhibits.
Generic small maze
Copy the script below into your baseplateScript file and run the world. You should see a small maze. Parameters that control the size and depth of the maze are stored in a Roblox "dictionary" passed as an argument to the newMaze function. Try changing the number of rows and columns and/or the height.
Basic Shapes
The code below will help you to explore different shapes and how they can be created.
Practice Exhibit Space
The code below will help you to practice creating an art installation.
Once you have created your exhibit, rename it with a new identifier then create another exhibit space. The "identifier" is the name of the function. The student art exhibit functions (contained in the studentExhibition module script) contain functions within themselves. Because these functions "encapsulate" other functions, it is necessary to store the return value in a variable and then access the "encapsulated" functions as "methods" of the object. Please see the section on "Student Exhibits" below for more details.
Student Exhibits
The code below will load a practice student exhibit space.
Notice that the above StudentExhibition.newQbert() function encapsulates two other functions within itself (See below). These encapsulated function will be called "methods" of the exhibitRoom that is returned from the main function above.
The .draw() method is executed once when the room is drawn. The .animate() method is executed from within a while loop in the main program. An example of the use of these functions would be to store the exhibitRoom in a variable, then call the methods (see below).
In the example above, a variable k is used to store the exhibitRoom and then .draw() method is used to show the art in the room and the .animate() method is used to animate the art.
Completed Art Museum
Notice: in the completed Art Museum, the student exhibits are stored in an array identified as: exhibitReferences. This simple array contains just the identifiers of each student exhibit. Further in the code, the rooms of the museum (expressed as: museum[i][j] are assigned a student exhibit using:
The identifier in the exhibitReferences[] array element is executed using the two parentheses at the end of the line. The student exhibit function then returns the exhibit details to be stored in the museum's room located at: museum[i][j].
Further in the code, the museum[i][j].draw() function is only executed if the humanoidRootPart is positioned inside the museum[i][j].room.region. The room is "destroyed" when exiting the room.
Notice: in the completed Art Museum, the student exhibits are stored in an array identified as: exhibitReferences. This simple array contains just the identifiers of each student exhibit. Further in the code, the rooms of the museum (expressed as: museum[i][j] are assigned a student exhibit using:
The identifier in the exhibitReferences[] array element is executed using the two parentheses at the end of the line. The student exhibit function then returns the exhibit details to be stored in the museum's room located at: museum[i][j].