Main Menu Camera At Part Position Doesn't Function

as u read the title the camera doesn’t go to the part position.

local menu = script.Parent
local cam =  workspace.CurrentCamera
local StartCam = workspace:WaitForChild("StartCam")

cam.CameraType = Enum.CameraType.Scriptable

if menu then
    cam.CFrame = StartCam.CFrame
else
    if not menu then
        cam.CameraType = Enum.CameraType.Fixed
    end
end
local menu = script.Parent
local cam =  workspace.CurrentCamera
local StartCam = workspace:WaitForChild("StartCam")

cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = StartCam.CFrame

would this not work? if not, can you tell me what “menu” is?

1 Like

the menu is a frame and no it doesn’t work

local menu = script.Parent
local cam =  workspace.CurrentCamera
local StartCam = workspace:WaitForChild("DO NOT DELETE")

repeat
	cam.CameraType = Enum.CameraType.Scriptable
until cam.CameraType == Enum.CameraType.Scriptable
cam.CFrame = StartCam.CFrame

if this doesnt work can you tell me what “startcam” is? a model or part or what

doesn’t workk
1111111111111111111111

Do you have any other scripts that mess with camera CFrame? I’ve had that happen a lot in my games

your code doesn’t look like it has any problems

but check this part

if menu then
    cam.CFrame = StartCam.CFrame
else
    if not menu then
        cam.CameraType = Enum.CameraType.Fixed
    end
    --what if menu isn't true but also not nil
end

then what is startcam
11111111111

Cameras don’t replicate from the server to the client. Are you sure StartCam isn’t a Camera part, and is instead a basepart?

That code path isn’t possible. It’d only return false if it is nil, so checking whether it is nil vs false is a losing battle.

any clue?
11111111111111111444

Instead of replying with numbers to meet the character count, how about you answer questions people are asking you to help debug the issue…? Your code works fine if your “StartCam” is NOT a “camera” object. Servers do NOT replicate cameras to the client. Just create a part with that name and you’re fine.

3 Likes