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

Why doesn't the visibility = false when it gets clicked?

local mainScreen = game.StarterGui.ScreenGui.MainScreen
mainScreen.Visible = true
script.Parent.MouseButton1Click:Connect(function()
	mainScreen.Visible = false
end)

Please tell me if it needs a remote, because I'm not so sure.

2 comments

0

Is it a Server Script or Local Script?

0

@CaptainAlien123 its local

1 answer

✓ Accepted answer

Items in StarterGui will be in PlayerGui. Do this.

local plr = game.Players.LocalPlayer
local mainScreen = plr.PlayerGui.ScreenGui.MainScreen

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