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
10. Teleport the lemon somewhere else
After you collect the lemon, teleport it somewhere random so you have to find it to collect it again. (Why wouldn't we want to just destroy the lemon?)
Starting point file for this challenge
Hint: show steps
Steps
1. Grab the lemon's position
Hint: show details
lemon.Position is where the lemon's position is being stored.
lemon.Position
Hint: show image
Hint: show code
2. Create a new vector3 value and set all coordinates to 0 for now
Hint: show details
A vector3 value is a way to hold x, y and z coordinates. For now, set all 3 spots to 0.
This code will set the lemon to the middle of your baseplate.
Vector3.new(0, 0, 0)
Hint: show image
Hint: show code
3. Randomize the x and z values
Hint: show details
Use the math.random() function to make the lemon choose new x and z values between -100 and 100
In other words, the lemon should teleport somewhere random now.
lemon.Position = Vector3.new(math.random(-100,100),0,math.random(-100,100))
Hint: show image
Hint: show code
4. Set Y to 3
Hint: show details
This will tell our lemon to teleport just above the ground.
Vector3.new(math.random(-100,100),3,math.random(-100,100))
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