What would be the best way to store ore generating positions

Hello everyone,

I’m currently making an ore generation script and was wondering, what is the best way to store positions for ores to spawn in?

I thought of 2 ways:
1-Using parts and getting the part’s position to spawn the ores
2-Storing ores position in a module script

Regardless of their pros and cons I want the a solution that is both performance friendly and easy to edit and I’m not sure if these two would do.

Do you guys have any other idea to approach this?

Thank you.

Edit: I’m storing about 200 positions in case you are wondering

I personally would use a folder.

Create a folder in workspace, add parts to it and anchor them, turn cancollide off and change their transparency to 0. position it where you want, name it the ore you want to spawn, eg
Iron1
Iron2
etc

repeat until you’re happy and then move the folder to serverstorage, and get their positions via a variable in your generation script

local folder = game:GetService(“ServerStorage”):FindFirstChild(“OreFolder”)

use getchildren on the folder and then spawn your ores in the positions of the parts

hope this helped

EDIT

ive just seen you’re storing 200 positions…

use a module script, it will take a while but store the positions in there and generate your ores in the positions

both solutions will work, both will take a while though

1 Like

Still wondering why this isn’t marked as a solution.

1 Like

the topic was created an hour ago and i responded 10 minutes ago, they might not be checking it right now

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.