In the white box is the textbox, everytime a number is inside the textbox and the player presses enter. I want the number they inputted in the textbox to be displayed in the textlabel, “Previous Guesses:”.
So that part is mostly easy to create, as a matter of fact I have done it. But the problem is when I type in another guess in the textbox and press enter. It replaces my previous guess
TextBox.FocusLost:Connect(function(Enter)
if Enter == true then -- Checks if EnterKey Is Pressed.
print("Pressed Enter!")
local TestText = TextBox.Text
script.Parent.Parent.Parent.Last.Numbers.Text = TestText .. "; "
local Number = tonumber(TextBox.Text)
if Number then -- checks if the textbox has only numbers if not it will not continue.
if Number == RandomNum then
script.Parent.Parent.Answer.ImageTransparency = 0
script.Parent.Parent.Answer.Image = "rbxassetid://12856690383"
wait(1.85)
script.Parent.Parent.Answer.ImageTransparency = 1
else
script.Parent.Parent.Answer.ImageTransparency = 0
script.Parent.Parent.Answer.Image = "rbxassetid://12856695110"
wait(1.85)
script.Parent.Parent.Answer.ImageTransparency = 1
end
end
end
end)