Hello! So I’m trying to create something where you convert strings into tables. I mean this.
'{{false, Vector2.new(0, 0), Enum.AutomaticSize.None, Color3.new(1, 1, 1), 0, Color3.new(0, 0, 0), Enum.BorderMode.Outline, 1, "Frame", 0, "Frame", ScreenGui (ScreenGui), UDim2.new(0, 0, 0, 0), 0, false, UDim2.new(0, 100, 0, 100), Enum.SizeConstraint.RelativeXY, Enum.FrameStyle.Custom, true, 1, true, false, true}}'
Convert that type of table to this type:
{{false, Vector2.new(0, 0), Enum.AutomaticSize.None, Color3.new(1, 1, 1), 0, Color3.new(0, 0, 0), Enum.BorderMode.Outline, 1, "Frame", 0, "Frame", ScreenGui (ScreenGui), UDim2.new(0, 0, 0, 0), 0, false, UDim2.new(0, 100, 0, 100), Enum.SizeConstraint.RelativeXY, Enum.FrameStyle.Custom, true, 1, true, false, true}}
Thank you.
Attempts:
#1
I tried encoding using JSON, but the Color3 or UDim2 values don’t show. That’s because it only encodes certain data types.
Solution:
Wow, someone already solved my problem! I didn’t know you can do it like that! It works. This method solved the Color3 or UDim2 values problem. All you need to do is create another table. That’s it? Anyway, here is the solution: