Why is this main menu script not working?

Hello, I was writing a main menu script for my game and this script is not working anymore. There is no errors and this is a local script

local player = game.Players.LocalPlayer

local camera = workspace.CurrentCamera

local character = player.Character or player.CharacterAdded:Wait()

local play = script.Parent.PlayButton

repeat wait()

camera.CameraType = Enum.CameraType.Scriptable

until camera.CameraType == Enum.CameraType.Scriptable

camera.CFrame = workspace.Cam1.CFrame

play.MouseButton1Click:Connect(function()

camera.CameraType = Enum.CameraType.Custom

print("hello")

end)

Forgot to mention that it also didn’t print hello

I think you need to remove the loop, just change the cameraType.

I removed the loop and it still didn’t work

Where is the script located???

This script is located inside the Main Menu GUICapture
(its called Camera)

Does the camera cframe changes?

Yes it does, it changes to my camera partCapture

Here is how it looks like in game…

There is something ahead of the button or something is deleteing the script?

1 Like

When I click on it, I want it to print hello but it doesnt

Oh i found the problem there was something ahead of the button, thank you