Buttons[1].MouseButton1Down:Connect(function() Screen.Text = Screen.Text:gsub('-','') print(Screen.Text) end)
This adds 1 to the screen, but for some reason it adds it to the start of the code. For example, if 123 is already on the screen, it would make it 1123, instead of 1231 like I want it to. I'm not sure how to properly use gsub and would appreciate some help. There's also a "-" already on the screen from the start because without it, the 1 doesn't get added for some reason.
Have you tried concatenation?
Buttons[1].MouseButton1Down:Connect(function() Screen.Text = Screen.Text .. "1" print(Screen.Text) end)
That just adds the number to the end of the string.
Accept and up vote if this helped (I need 1 up vote)