Is it posible to make a datastore for an object? like saving a blocks color in the block
I have tried looking on roblox and online and could not find anything
sorry im new to datastores still lol
Thanks
2 Likes
Nah. You can store tables though
ye like this
local Data = {
["1"] = {
["Instance"] = "Part",
["Color"] = Color3.fromRGB(0, 0, 0),
["Size"] = Vector3.new(10, 10 ,10),
["Position"] = Vector3.new(0, 0, 0)
},
["2"] = {
["Instance"] = "Part",
["Color"] = Color3.fromRGB(0, 0, 0),
["Size"] = Vector3.new(10, 10 ,10),
["Position"] = Vector3.new(0, 0, 0)
}
}
-------------------------------------------------------
for i, v in pairs(Data) do
local CurrentObject = Data[i]
local Object = Instance.new(CurrentObject.Instance)
Object.Color = CurrentObject.Color
Object.Size = CurrentObject.Size
Object.Position = CurrentObject.Position
--
Object.Parent = game.Workspace
end
2 Likes