Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

TextBox Code Help?

Asked by 8 years ago

Ok so i want to make a code so if they type the code it will give them a certain item i tried changing its text so if its text is changed to the code ?

0
Could we see your code, we just give you the code without proof you've at least tried. General_Scripter 425 — 8y
0
well i knid of deleted it ill do it again if youed like i promise I did johndeer2233 439 — 8y
0
You've already got a perfectly good answer, accept it. You got lucky that someone was kind enough to give you code without anything to base it off. General_Scripter 425 — 8y
0
Im sorry johndeer2233 439 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

This is simple, but don't ask for request in the future. Only warning. What you'll need: TextBox inside a GUI, and a TextButton inside a GUI. This script is inside a localscript inside TextButton.

script.Parent.MouseButton1Click:connect(function() -- Button is clicked.
    if script.Parent.Parent.TextBox.Text == "password" then -- if the word is exactly inside the box then do a function.
        -- Do what you want.
    else -- if it isn't it, then do something else.
        print("Wrong Code.")
    end
end)

Good luck.

0
MouseButton1Click is not a valid member of TextBox johndeer2233 439 — 8y
0
Put the script inside the TextButton. JamesLWalker 297 — 8y
0
look this is what Ihave Code(ScreenGui)<BackGround(Frame)<CodeInsert(TextBox) where do I put the textbutton? johndeer2233 439 — 8y
0
I figured it out thanks johndeer2233 439 — 8y
Ad

Answer this question