so i have a logs system and it tells you what value has changed and what it changed to.
Like for example if i changed a value from true to fale, the new log should say
“Changed MyValue To: False”
the reason im trying to turn a bool into a string is because well… you cant put a bool as text on gui.
One issue is that it just always returns nil, even if the value that changed was a string value.
Heres the code that check everything:
local function CreateUpdateLog()
local LS = game.Workspace:WaitForChild("LogsScreen"):WaitForChild("SurfaceGui"):WaitForChild("BG")
local L1 = LS.TEMP.About:Clone()
L1.About.Text = "Heres some things we changed!"
L1.Parent = LS.About
L1.Visible = true
local L2 = LS.TEMP.Date:Clone()
L2.Date.Text = module.Date
L2.Parent = LS.Date
L2.Visible = true
--Complicated stuff :(
local L3 = LS.TEMP.Info:Clone()
L3.Parent = LS.Info
local Placement = L3.List
local Item = LS.TEMP.ChangedLabel
L3.Visible = true
for i, v in LastInstanceOfWRLDDATA do
if v ~= module[table.find(module, i)] then
local L4 = Item:Clone()
L4.Text = "Changed "..i.."To: "..tostring(module[table.find(module, i)])
L4.Parent = Placement
L4.Visible = true
end
end
for _, V in module do
if _ == "Age" or _ == "Pop" or _ == "Date" or _ == "Danger" or _ == "Economy" or _ == "AvrgMood" or _ == "Wants" or _ == "Anger" then
LastInstanceOfWRLDDATA[_] = V
end
end
end
And heres what it does right now:
If anyone can help, thanks!