Sword Mesh and Textures

I am working on a sword system.

I love the Sword system in Slaying simulator. They have 105 different swords. I am trying to figure out how they did it. I have figured out that they have one sword and just change the MeshId and TextureId.

What would be the best way to implement this type of system. Lets say I have 200+ different sword texture and MeshId’s. I am thinking I could create the 200 Mesh objects, but where to put them. I would like to access them for the weapon load, but would also like to access them for the GUI where the user can select the weapon they desire.

Questions:

  1. What would be the best architectural solution in terms of performance.
  2. If I create a whole bunch of Mesh objects I assume they would load with the game, but If I code them through tables, would they load as called.
  3. What are your ideas on this?

Definitely have as few meshes as possible. If you’re worried about loading, that’s not a big issue.

You can use PreloadAsync on the client to load meshes and textures ahead of time. No need to load all of them, which is what having 200 mesh objects would do; just load the ones the player would see in ViewportFrames and let Roblox handle loading for the rest.

3 Likes