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

My gui is not visible in game when told to be visible. What do I do?

local code = script.Parent.Parent.Code
local Pass = script.Parent.Parent.Pass
local Admin = game.StarterGui.ScreenGui.Admin



script.Parent.MouseButton1Click:Connect(function()
	if Pass.text == code.Value then
		script.Parent.Text = 'Correct'
		wait(2)
		script.Parent.Parent.Visible = false
		Admin.Visible = true
		Admin.Active = true
	else script.Parent.Text = 'Incorrect'
		wait(2)
		script.Parent.Text = 'Try Again'
	end
end

ok so I have a locked gui(admin panel) that when it puts a password in it should open the admin frame it makes it visible but the admin frame is not showing do I have a problem in my code? I also have a Rainbow script that Makes the border color change colors

function zigzag(X) return math.acos(math.cos(X*math.pi))/math.pi end

counter = 0

while wait(0.2)do
 script.Parent.BorderColor3 = Color3.fromHSV(zigzag(counter),1,1)
 
 counter = counter + 0.01
end


3 comments

0

game.StarterGui

0

Greatneil80?

0

I dont understandd

1 answer

✓ Accepted answer

The above comment means this: the player's gui is found in the PlayerGui object, not the StarterGui once you are in a game.

Simply change Line 3 to

local player = game:GetService("Players").LocalPlayer
local Admin = player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("Admin")

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