Sign in
Home
Online Classes
Instructors
Tutorials
☰
Register
Sign in
Online Classes
Instructors
Tutorials
1. Open Roblox studio and load the starter kit
2. Test the game out
3. Add a script to ServerScriptService
4. Create and start a "leaderboard" function
5. Finish filling out the variables
6. Run the leaderboard function when the player loads
7. (Concept Excercise) Find and read your lemon's script (c)
8. Program to see if a humanoid touched the lemon
9. Add +1 to your total lemons if you collect a lemon
10. Teleport the lemon somewhere else
11. Run the collect function when the lemon is touched
12. Test and duplicate lemons
13. Store the lemonade stands in the server
14. Add a script to your "BuyStand" button
15. Setup variables for the BuyStand script
16. Create and activate a "buystand" function
17. Program to see if a humanoid touched the button
18. Check to see if the player is allowed to buy the stand
19. Program subtracting money
20. Finish programming the lemonade stand purchase
21. Create a function for earning money
22. Check to see if the player is able to make lemonade
23. (Concept Exercise) How to make and sell lemonade (c)
24. Test and duplicate buystand buttons
25. (Optional) Program the deluxe lemonade stand
Project 387: Lemonade Tycoon
4. Create and start a "leaderboard" function
A function is a set of instructions for the code that we bundle up and name to stay organized! The last step of this challenge has some code to copy and paste into your function to get a head start.
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 function called "leaderboard"
Hint: show details
Tell the script you're starting a new function by just typing "function." Then, write the name of your new function, which we'll call "leaderboard."
function leaderboard
Hint: show image
Hint: show code
3. Create a parameter called "player" for your function
Hint: show details
This parameter will eventually refer to our player character
function leaderboard (player)
Hint: show image
Hint: show code
4. Hit return on your keyboard to create an "end" to your function
Hint: show details
Anything written in between the word "function" and "end" will be the instructions for the leaderboard stats.
function leaderboard (player) end
Hint: show image
Hint: show code
5. Copy and paste the following code into the function
Hint: show details
You'll learn how to fill out all these variables in the next challenge.
local leaderstats = leaderstats.Name = leaderstats.Parent = local coins = coins.Name = coins.Parent = coins.Value = local lemons = lemons.Name = lemons.Parent = lemons.Value =
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