How to add numbers one by one

So, I want to add numbers one by one into IntValue by pressing the UI button, but I don’t know what to type and what API I should use, I also don’t really understand how to change numbers in programming (like strings or whatever is that).

For example:
I press 1 button
Value = 1

I press 8
Value = 18

I press 5 and 9
Value = 1859

Localscript inside intvalue:

local keypad = path.to.keypad

for i = 0, 9 do
    keypad:FindFirstChild(tostring(i)).MouseButton1Click:Connect(function()
        script.Parent.Value = tonumber(tostring(script.Parent.Value)..tostring(i))
    end)
end

I already try it, its work thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.