Hello, I’m facing an issue where I wanted my classGUI to pop up next after I clicked play but it doesn’t work after I entered “game.StarterGui.ClassGui.Enabled = true” this code into the playbutton category. It was supposed to be disabled in the beginning because the main menu is playing. Here is the code for the playbutton.
local Players = game:GetService("Players")
local class = game.StarterGui.ClassGui.Main
local player = Players.LocalPlayer
local playerGui = player.PlayerGui
local cam = workspace.CurrentCamera
local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()
local UserInputService = game:GetService("UserInputService")
script.Parent.MouseButton1Click:Connect(function()
--wait()
cam.CameraType = Enum.CameraType.Custom
cam.FieldOfView = 70
player.PlayerScripts:WaitForChild("MenuCameraLocalScript"):Destroy()
player.PlayerScripts:WaitForChild("CamFOV"):Destroy()
playerGui:WaitForChild("ScriptsGui"):Destroy()
--playerGui:WaitForChild("CameraRigScript"):Destroy()
--playerGui:WaitForChild("DDD"):Destroy()
--playerGui:WaitForChild("Language"):Destroy()
playerGui:WaitForChild("MenuGui"):Destroy()
playerGui:WaitForChild("PAKTCGui"):Destroy()
playerGui:WaitForChild("StudioLogo"):Destroy()
class.Visible = true
Controls:Enable()
UserInputService.MouseDeltaSensitivity = 1
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
game.StarterGui:SetCore("ResetButtonCallback" ,true)
end)