I need a help with GUI Visibility

  1. So I wanted to make advanced GUI with a PLAY button, I made a Local script with a code:

script.Parent.MouseButton1Click:Connect(function()
frame.Visible = false
camera.CameraType = “Custom”
end)

But it seems it doesn’t work, I tried multiple times with RemoteEvents but nothing, any fix? The only thing that works is the camera.

What is frame defined as? script.Parent.Parent?

local frame = game.StarterGui.MM.MM_Frame

Insert everyone is typing here

So, you’re getting the StarterGui which is only replicated across the server’s side & will not detect any event input from your client (Or what you see on the screen)

This should work, and if for some reason it doesn’t do check for print statements

local Cam = workspace.CurrentCamera

local Button = script.Parent
local Frame = --Define where your frame is here using Button.Parent (I'm assuming), instead of getting the StarterGui

Button.MouseButton1Down:Connect(function()
    Cam.CameraType = "Custom"
    Frame.Visible = false
end)

Thanks M8, you’re litterally best.