How do I save tools without having a clone of it in ServerStorage/ReplicatedStorage?

I have a game where the player can create custom tools by clicking on a brick. I found a few tutorials and scripts for saving a tool, but they all require the tool in ServerStorage or ReplicatedStorage so it can be cloned back into the player. I can not find a way to have the tool saved without it being in a container service. Can someone give a point in the right direction on how to do this?

1 Like

Instead of saving the tool instance have you tried saving what bricks were clicked in order to obtain the tool?

I don’t understand what you are saying. Can you elaborate?

Sure,

You save the inputs used to make the output.

For your case you save the bricks that were clicked to make the tool. For example it’s a pizza maker, you save in datastore “Pizza Dough”, “Tomato Sauce”, and “Cheese” to make cheese pizza tool. Unfortunately this is the best example I can try to relate with your problem as much as possible.

The specific term you can search online for more answers is serialization and this tutorial should be good:

2 Likes

To further elaborate the idea, you make a template of the tool’s content. Then after you clone the tool, you change all the attributes of the tool to what the player selected. After changing everything, you parent the cloned copy to the player’s backpack.

1 Like

I can not do that as sometimes the parts/handle for the tool has a script within it. I do not think it is possible to save a script, so that wouldn’t work

Hello all, I have decided to take a different approach to this. It appears that it will work flawlessly. Thank both of you for trying to help me on this topic.