In ServerScriptService create a Script with a “for loop” to go through the folder with the coins, trying to detect if any of the coins are touched, and if so then carry out the commands associated with picking up the coin. No script is attached to any of the coins. ![]() Under Workspace create a folder to hold all 100+ coin parts. Place all the 100+ coins directly on the map Option #3- This is where I’m unsure, but I’m thinking… Bad because there are still 100+ scripts running and the location parts are now extra items that must be loaded into the world. Thoughts: Better than Option #1 because there is only 1 script to change. In the Script use a “for loop” to go through the folder with the spawn parts, cloning the coin Model into the position of each spawn part. Under ServerScriptService create a Script. Under ReplicatedStorage have a coin Model containing both the coin and “pick-up” Script. Under Workspace, create a folder to hold the 100+ spawn parts. The spawn parts are transparent and CanCollide is false. Option #2- Place 100+ small parts around the game map to serve as spawn locations for the coins. Plus if the “pick-up” script needs to be changed, each of the 100+ Scripts have to be individually modified. Thoughts: This seems to be a poor choice because each coin has its own Script, so there are 100+ scripts running, creating excessive work on the server. Insert a “pick-up” Script into each coin. ![]() Under Workspace, create a folder to hold all 100+ coin parts. ![]() Option #1- Place all the coins on the game map. These are possibilities I can think of, based on my emerging knowledge: My question for the Developer Community is: What is the cleanest, least software/hardware taxing way to set up this scenario in Roblox Studio? By “picked up” I mean the a coin becomes transparent, with a debounce to not be picked up again for 10 seconds, and a value of 1 is added to the player’s Leaderstats. Each coin is scripted to be “picked-up” when touched by a player. The scenario and question I present is: I have a game map with 100+ coins placed across it. I’m a new member, first post, learning the basics.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |