Im testing out data store to save instances (lol) but i cant seem to save the face of a decal.
saving:
dataStore = game:GetService("DataStoreService"):GetDataStore("WOAH")
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)
local models = game.ReplicatedStorage.Model
local e = {}
for i, obj in pairs(models:GetDescendants()) do
if obj:IsA("Decal") then
table.insert(e, {
["ParentName"] = obj.Parent.Name;
["Texture"] = obj.Texture;
["Transparency"] = obj.Transparency;
["Face"] = tostring(obj.Face);
})
end
end
dataStore:SetAsync("key", e)
end)
loading:
dataStore = game:GetService("DataStoreService"):GetDataStore("WOAH")
game.ReplicatedStorage.RemoteEventr.OnServerEvent:Connect(function(plr)
local xd = dataStore:GetAsync("key") or {}
if xd then
for i, v in pairs(xd) do
if v then
local SavedModel = game.ReplicatedStorage.Model
if SavedModel then
local Model = SavedModel:Clone()
Model.Parent = workspace
local decal = Instance.new("Decal")
decal.Transparency = v.Transparency
decal.Texture = v.Texture
decal.Parent = Model.Model[v.ParentName]
end
end
end
end
end)

3 comments
U simply cant.
orojgioregrekge ok thx
You CAN