Having trouble returning players camera after being manipulated

Hello, I am making a roblox game that includes a main menu

The part which is used as the camera in the main menu is called “CameraPart”
I have tried many things but it doesnt seem to be helping, Can you help?

local CameraStart = workspace:WaitForChild("CameraPart")
local camera = workspace.CurrentCamera
local bool = true
local Player = game:GetService("Players").LocalPlayer.Character

script.Parent.MainFrame.Visible = true

camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CameraStart.CFrame

	script.Parent.MainFrame.Visible = false
	game.Workspace.SpawnPoint.CFrame = CFrame.new(Vector3.new(0,20,0))
	if bool == true then
		bool = false

if bool == false then
	camera.CameraType = "Custom"

I hope you can help me and others

1 Like

On the last line where you supposedly set the player’s camera to normal, you’ve set the CameraType to a string, not an enum. To return the camera to normal, you would use:

camera.CameraType = Enum.CameraType.Custom
1 Like

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