local plr = game.Players.LocalPlayer
local mainScreen = plr.PlayerGui.ScreenGui.MainScreen
local folder = Instance.new("Folder",plr.PlayerGui)
mainScreen.Parent = folder
folder:WaitForChild(mainScreen)
--script.Parent.MouseButton1Click:Connect(function()
mainScreen.Visible = false
--end)
COMMUNITY QUESTION
I want it to make the visible to false but idk it won't work?
1 answer
Im guessing mainScreen is a ScreenGui which means it does not have the Visible option instead you have to use Enabled
local plr = game.Players.LocalPlayer
local mainScreen = plr:WaitForChild('PlayerGui').ScreenGui.MainScreen
local folder = Instance.new("Folder",plr.PlayerGui)
mainScreen.Parent = folder
folder:WaitForChild(mainScreen)
--script.Parent.MouseButton1Click:Connect(function()
mainScreen.Enabled = false
--end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
