Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

TextBox Code Help?

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 ?

4 comments

0

Could we see your code, we just give you the code without proof you've at least tried.

0

well i knid of deleted it ill do it again if youed like i promise I did

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.

0

Im sorry

1 answer

✓ Accepted answer

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.

5 comments

0

MouseButton1Click is not a valid member of TextBox

0

Put the script inside the TextButton.

0

look this is what Ihave Code(ScreenGui)<BackGround(Frame)<CodeInsert(TextBox) where do I put the textbutton?

0

I figured it out thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.