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

How do you make a group password GUI?

Asked by 8 years ago

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)

0
Why are you making a group code GUI? If you have a group, you can use the `Player:IsInGroup(int GroupID)` method. NoahWillCode 370 — 8y
0
Can you just fix the script because its for a friend and he wants it like that. User#9821 0 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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)
0
Imma test it.Thanks for giving me a good answer tho instead of others.Btw can you check out my other questions? User#9821 0 — 8y
0
Thanks dude it work!!! Im about to post a new question if I don't figure it out mind User#9821 0 — 8y
Ad

Answer this question