PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Changing the Object Table

Now we’ll replace the example object’s information with the new information.

  1. Rename the table from newObject to a name that's similar to your object's name. No spaces here! For our example, we'll be using beachBall.
  2. Where it says MODEL = ServerStorage ["New Object"] replace New Object with the name of your second object. Make sure it matches the name in ServerStorage exactly. Include spaces and match capitalization!
  3. Finally, replace newObject in the list of falling things with the name of your object table.

Great! Play the game again and you should see the new object (plus burning rocks) falling from the storm cloud.

Remember that anchoring things stops them from falling. If your new object isn't falling, make sure that it's not anchored.

  1. In the Explorer, under ServerStorage, select the object.
  2. On the Home tab, make sure Anchor isn't highlighted grey.

Side Quest – Make the Cloud Produce Healing Objects

Using what you learned in previous lessons, try to make the cloud rain healing objects like water bubbles!

  1. Copy a friendly-looking object like this water bubble into ServerStorage.
  2. In the cloud's script, change the table name, object name, and table.insert() name just like you did for other falling objects.
  3. Earlier in this project, you created a healing part that used a negative number for its "damage" amount. The same idea can work with falling objects, so change DAMAGE to something like -10. Now players will gain 10 health every time they pick up a water bubble!

Previous Next Page