How can I call something and put a percentage in it?

Well, I try to call a value and insert information from a text, at the end it should detect that another function but it gives me error 13: attempt to concatenate table with string

local PropertyText = script.Parent.Parent:WaitForChild("Property")
local TextBox = script.Parent
local Info = {}

TextBox:GetPropertyChangedSignal("Text"):Connect(function()
TextBox.Text = TextBox.Text:gsub('%D+', '')
table.insert(Info, TextBox.Text)
end)

TextBox.FocusLost:Connect(function(enterPressed, inputThatCausedFocusLost)
if enterPressed then
TextBox.Text = "{".. Info.."}"
else
TextBox.Text = "{".. Info.."}"
end
end)

Changing…
TextBox.Text = "{".. Info.."}"
…to…
TextBox.Text = "{".. table.concat(Info).."}"
…will allow your code to compile and output the information contained in your Info table, but I’m not certain what your aim is.

1 Like

For some reason it doesn’t work for me, or something like that since the number is multiplied (or I don’t know what happens as the number increases)