Sign in
Home
Online Classes
Instructors
Tutorials
☰
Register
Sign in
Online Classes
Instructors
Tutorials
1. Open Roblox Studio and load the starter kit
2. Explore the maze
3. Add a script to your door
4. Label the door in the script
5. Create a function for opening the door
6. Activate the function
7. Close the door again
8. (Challenge) Create a bigger maze
Project 374: Key and Door Maze
4. Label the door in the script
Your script should now have one line in it, that tells the computer what the "door" is.
Starting point file for this challenge
Hint: show steps
Steps
1. Delete the "print hello world" line
Hint: show details
This is a cute hello from Roblox, but we don't need it in our script.
Hint: show image
2. Create a local variable called "door"
Hint: show details
Creating a local variable in Lua is as easy as typing "local door"
local door
Hint: show image
Hint: show code
3. Tell the script where the door variable is
Hint: show details
If you remember that, in code, parents hold children, what's the door in relation to the script? The door is the parent of the script, because it's holding the script. So, tell the computer that your "local door" variable is your "script.Parent"
local door = script.Parent
Hint: show image
Hint: show code
×
×
Provide your email address for immediate project access
Email
Check your email for instructions on how to create a full DA account