Camera Script Not Working

I scripted a play menu in my game, and I want to configure some settings with the Gui, along with the camera.

The problem is, my code doesn’t work. I feel like I’ve written this code hundreds of times, yet I have never encountered these errors.

Here is my script:

game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)



local Camera = workspace.CurrentCamera


Camera.CameraType = Enum.CameraType.Scriptable

Camera.CFrame = workspace:FindFirstChild("CameraPart").CFrame


Camera.CameraType == Enum.CameraType.Scriptable

The ResetButtonCallback line errors that it is not found in the CoreScripts, while the camera script just flat out doesn’t work.

I will appreciate any suggestions. Thanks for reading!

Where is the script located? Is it a local script? It should be a local script under StarterGui. If you have not done that yet, I suggest you do. The Repeat Until function isn’t required in this script, so I suggest you remove it and replace it with just the two actions.

The code should work, maybe the script is misplaced.