So i'm making this game were there is a pyramid and you have to put a code into a text box and if you get the code correct you may pass. The only problem i have is seeing what the player typed in the text box and see if its correct.Here is my script im looking for a better way
if script.Parent.Text == "2020" then print("yeayy") end
script.Parent.Changed:Connect(function (text) -- this will trigger the function whenever the text is edited if text == "2020" then --Code goes gere end end)
This is a better solution if you are finding out whether the player has stopped typing and unfocused the box.
script.Parent.FocusLost:Connect(function() -- When the focus is lost, fire this if script.Parent.Text == "text" -- If the input is correct -- Code here end end)