UI Not Showing With No Errors

I want to make a Menu with a camera. I went through many issues and someone gave me a recommendation to fix one of them, after I used that, my UI disappeared. No errors, nothing. I’m not sure what to do.

Here’s the code.

local camera = workspace.CurrentCamera
local cameraPos = workspace:WaitForChild("MenuCamera")
local playBtn = script.Parent.PlayBtn
local Title = script.Parent.Title
local MMTheme = game.Workspace.Sounds.MainMenuTheme
local MainTheme  = game.Workspace.Sounds.BGMusic
local fader = script.Parent.Fade

local plr = game.Players.LocalPlayer

local cameratype = Enum.CameraType.Scriptable
local cf = cameraPos.CFrame

wait(.001)

game.StarterGui.ScreenPlay.PlayBtn.Visible = true
game.StarterGui.ScreenPlay.Title.Visible = true
MainTheme.Playing = false
MainTheme.Looped = false
MMTheme.Playing = true
MMTheme.Looped = true

camera.CameraType = cameratype
camera.CFrame = cf

local Conn = camera:GetPropertyChangedSignal("CameraType"):Connect(function()
	if not (camera.CameraType == cameratype) then
		camera.CameraType = cameratype
		camera.CFrame = cf
	end
end)

camera.CameraSubject = cameraPos
camera.FieldOfView = 50

playBtn.MouseButton1Click:Connect(function()
	game.Workspace["Menu Map"]:Destroy()
	game:GetService("TweenService"):Create(fader, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
	task.wait(.01)
	game:GetService("TweenService"):Create(fader, TweenInfo.new(0.2), {BackgroundTransparency = 0}):Play()
	wait(0.5)
	game:GetService("TweenService"):Create(fader, TweenInfo.new(0.2), {BackgroundTransparency = 0}):Play()
	task.wait(.01)
	game:GetService("TweenService"):Create(fader, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
	local char = plr.Character or plr.CharacterAdded:Wait()
	Conn:Disconnect() -- disconnect the function
	camera.CameraType = Enum.CameraType.Custom
	camera.CameraSubject = char.Humanoid
	MMTheme.Playing = false
	MainTheme.Playing = true
	MainTheme.Looped = true
	playBtn.Visible = false
	Title.Visible = false
end)

Here’s what it looks like. The UI visibility is true, everything is visible and enabled, it just doesn’t show.

Please help me, thank you so much.

This sort of thing can happen, and you might wanna just go through every parent, go through the entire hierarchy to see if any of them (while the game is playtesting) is invisible, disabled, deleted.

1 Like

Thank you so much, do you know any routines to go through this check?

1 Like

Did it work? Don’t thank me if it didn’t work :sweat_smile:
I don’t know any great ways of doing it. I just start from StarterGui then work my way down by checking each child of each child of each child, etc.

1 Like

Haha, not that I know of it didn’t work :laughing:
I don’t have much in my StarterGui, and nothing seemed to be deleted disabled or invisible. I’ll try positioning, but for now, thank you for helping :heart: :joy:

im gonna playtest

Update: i tried making a new button while in testing mode and it was just automatically invisible, no properties seem to be doing this. what could have done this? im sorry lol. @MykoNil

1 Like

Sounds like a parent of the button is invisible. The property name is Visible.

1 Like

It was positioning haha. Thank you for everything, and I’m sorry for the hassle. Enjoy your weekend! Have an amazing day.

1 Like

No worries :+1: I’m glad to be of assistance. You have a good weekend too and happy coding!.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.