How can I hide the CoreGui (backpack, chat, leaderboard) when I click a button of my Gui? So, when I click the "Play" button on my Gui, it creates a new instance (part)
menu = script.Parent.Parent.Parent
image = script.Parent.Parent
script.Parent.MouseButton1Down:connect(function()
image.ImageTransparency = 0.2
changecoregui = Instance.new("Part",workspace)
changecoregui.Name = "changecoregui"
wait(0.2)
image.ImageTransparency = 0.4
wait(0.2)
image.ImageTransparency = 0.6
wait(0.2)
image.ImageTransparency = 0.8
wait(0.3)
image.ImageTransparency = 1
wait(0.3)
menu:Destroy()
end)
there is a local script at StarterGui that hides the all the CoreGui
local startergui = game:GetService('StarterGui')
startergui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
and there is another local script at StarterGui that needs to show all the CoreGui back when I click the "Play" button. But it does not work, how can I fix it?
local startergui = game:GetService('StarterGui')
changecoregui = workspace:FindFirstChild("changecoregui")
if changecoregui then
startergui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
end

1 comment
Thank you.