Is it possible to save anything inside Folder?

I want a exact same thing as you died for PlayerLeave and PlayerJoined, Folder will saved anything such as Model, if inside were added or remove, including different ClassName.

I’m trying to save Folder inside for Morphs, So i can clone them.

What is the issue?

BoolSaving Script

local DataStore = game:GetService(“DataStoreService”)

local ds = DataStore:GetDataStore(“BoolSave”)

game.Players.PlayerAdded:connect(function(player)

local folder = Instance.new(“Folder”,player)

folder.Name = “MorphsSaveData”

local model = Instance.new(“Model”,folder)

model.Name = “Scout Bot”

local bool = Instance.new(“BoolValue”,model)

bool.Name = “SBoolValue”

bool.Value = ds:GetAsync(player.UserId) or false

ds:SetAsync(player.UserId, bool.Value)

end)

game.Players.PlayerRemoving:connect(function(player)

ds:SetAsync(player.UserId, player.MorphsSaveData[“Scout Bot”].SBoolValue.Value)

print(“Your Scout Bot has been save!”)

end)

Video

https://www.youtube.com/watch?v=GXDF-ToPrIw

It does save itself when you died to keep these inside the folder, I want it exact for PlayerLeave and PlayerJoined(As Loaded)

What solutions have you tried so far?

Is any of these solution?

Comment your Example if this possible, Thank you.

The fact that those functions each have the red “deprecated” banner should be a very glaring red flag that no they are not solutions to your problem. You should not be using deprecated items for new work.

You are able to save things inside folders but they must be transferrable into a primitive Lua datatype excluding the types function, thread and userdata. If you want to be able to “save a model”, then what you actually need to be doing is saving an indicator of some kind about the model (such as its name). When you load data, you look if this string exists and then fetch a model out of ServerStorage.

Remember that folders superseded using models as containers for objects, so if you aren’t making an assembly of parts, you should be using folders. It’d probably be easier this way for you because then you can write a function that will take a folder and transform it into a dictionary.

By the way - stop using the parent argument of Instance.new.