-
Book Overview & Buying
-
Table Of Contents
Coding Roblox Games Made Easy, Second Edition - Second Edition
By :
As in most battle royale games, players will start with a mediocre starting weapon and then begin looting around the map for better weapons. In this section, we will be creating a system that spawns weapons around the map for players to find and use.
Keep in mind that for this system, you should have several weapons designed using the weapon system we made previously; the more weapons there are to find, the more players will continue to look for them.
To start this system, add a new module titled Loot to the ServerHandler script. In this module, add the following code, which defines the services and other references we will need, as well as making the spawn parts hidden, anchored, and made so that you cannot collide with them. As you will see, we will need a new Folder called LootSpawns that will contain anchored Parts that weapons will spawn on. By default, weapon models will spawn one stud above the position of the Part itself, so keep this in mind when placing...