I have made a textbutton that covers all across the screen and when you click it... here is the code,
script.Parent.MouseButton1Click:connect(function() game.StarterGui.ScreenGui.TextBox.Text = game.StarterGui.ScreenGui.TextBox.Text + 1 end)
Since TextBox is not a value I am confused on how I change the Text of textBox to add 1 when the textbutton (that covers the whole screen) is clicked. The problem is though is that it looks like this in explorer in studio.. game>StarterGui>ScreenGui>Textbutton>Script and then game>StarterGui>ScreenGui>TextBox... Is this right or should they both be in the same screen gui? They are both in opposite screen GUIs in the StarterGui. Is this right?
You can use a Variable. An Intvalue or what not is not required.
local number = 0 local sp = script.Parent sp.MouseButton1Click:connect(function() number = number +1 sp.Text = ""..number end)
Try putting an IntValue in the Textbox then do this (Put this script in the text box too):
local Int = script.Parent.IntValue local TextBox = script.Parent TextBox.Text = "" .. Int.Value script.Parent.MouseButton1Click:connect(function() TextBox.Text = "" .. Int.Value +1 end)
Try that.