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

How do you make a group password GUI?

This is what I got so far.It has a read line on 6 where the equal sign is next to the Text = 2593316.It seems to not work. I have a enter button and thats what the button is.Code is the textbox to enter the code in

button = script.Parent
Code = script.Parent.Parent.Parent.Password.Code

function IClickedTheButton()
	while true do
		if game.StarterGui.ScreenGui.Password.Code.Text = 2593316
			then game.StarterGui.ScreenGui.ENTER.TextButton.TextTransparency = 1
			wait(.1)
			Code.TextTransparency = 1
			wait(.1)
			Code.TextStrokeTransparency = 1
		end
end

button.MouseButton1Click:connect(IClickedTheButton)

2 comments

0

Why are you making a group code GUI? If you have a group, you can use the Player:IsInGroup(int GroupID) method.

0

Can you just fix the script because its for a friend and he wants it like that.

1 answer

✓ Accepted answer

I'm sure there are plenty of others who could answer this with better explanations for why it's not working, but here's what I'm seeing:

  • "while true do" is a loop and shouldn't be used for this script.

  • The content (in this case, password) of the textbox should be placed inside quotation marks.

  • "game.StarterGui" won't change the player's ScreenGui, but the ScreenGui that's given to the entire server.

  • You need two equal signs as it's for comparisons (in this case, comparing Code.Text to "2593316").

Place this inside of a LocalScript, not a Script (usually you should use LocalScripts for Guis):

local Code = script.Parent.Parent.Parent.Password.Code
local player = game.Players.LocalPlayer

function C()
if Code.Text == "2593316" then
	player.PlayerGui.ScreenGui.ENTER.TextButton.TextTransparency = 1
	wait(.1)
	Code.TextTransparency = 1
	wait(.1)
	Code.TextStrokeTransparency = 1
end
end
script.Parent.MouseButton1Click:connect(C)

2 comments

0

Imma test it.Thanks for giving me a good answer tho instead of others.Btw can you check out my other questions?

0

Thanks dude it work!!! Im about to post a new question if I don't figure it out mind

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