Looking to create values based on the content of a dictionary.
local dictionary = {
["Content1"] = "Hello",
["Content2"] = 50,
["Content3"] = "Bonjour"
}
for w, item in pairs(dictionary) do
print(item)
if tonumber(item) ~= nil then
local val = Instance.new("IntValue", dataFolder)
val.Name = dictionary[item]
val.Value = item
else
local val = Instance.new("StringValue", dataFolder)
val.Name = dictionary[item]
val.Value = item
end
end
How can I name the values “Content1” rather than the value of “Hello”?