I have tried string.find, string.sub, and string.split but it would only print this; table: 0x6c4beacf9dc299fc is there any way I could make it print the ABC.
local function Test(Goal)
local makestring = tostring(Goal)
print(Goal)
--local makestring = tostring("abc = 123")
local str = string.sub(makestring, 1, 100)--string.split(makestring, "=")
print(str)
--print(str[1])
end
Test({ABC = 123})
tables cannot be serialized with tostring. The simplest way to serialize would be to use JSON.
local HttpService = game:GetService("HttpService")
local function Test(Goal)
local makestring = HttpService:JSONEncode(Goal)
print(Goal)
--local makestring = tostring("abc = 123")
local str = string.sub(makestring, 1, 100)--string.split(makestring, "=")
print(str)
end
Test({ABC = 123})