How do i make it so when i click a button i can remove the most recent character/letter in a string/text like a backspace? Ive tried this and it doesnt seem to be working for me. (the gui is a surface gui if this changes anything with an adornee.)
script.Parent.Buttons.Delete.MouseButton1Click:Connect(function()
local text = tostring(box.Text)
text = string.sub(text, 1, #text-1)
end)
--box is equal to a textbox.