Camera for menu

So I want to make a camera for my menu, in the background.

I have that working but I just need to reset it

local cc = workspace.CurrentCamera
local pc = workspace:WaitForChild("PlayCam")

task.wait(0.001)

cc.CameraType = Enum.CameraType.Scriptable

cc.CFrame = pc.CFrame

local function playerEntered()
	cc.CFrame = pc.CFrame
end

game.Players.PlayerAdded:Connect(function()
	playerEntered()
end)

local function play()
	cc.CFrame = pc.CFrame
end

script.Parent.Frame["Fp Team"].MouseButton1Down:Connect(function()
	-- Reset camera
end)
script.Parent.Frame["Deeds Team"].MouseButton1Down:Connect(function()
	-- Reset camera
end)```

Help appriciated.
local cc = game.Workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
	Enum.CameraType = Enum.CameraType.Custom
end)

idk im probablly wrong.

i also had this problem but i dont remember how i was fixing it.

try get the players character and set the cc.CFrame to the characters head. also add a line of code to make the cc.CameraType to custom.

local plr = game.Players.LocalPlayer
local character = plr.Character or plr.Character:Wait()

script.Parent.Frame["Fp Team"].MouseButton1Down:Connect(function()
    if character then
        cc.CFrame = character.Head.CFrame
        cc.CameraType = Enum.CameraType.Custom
    end
end)
script.Parent.Frame["Deeds Team"].MouseButton1Down:Connect(function()
	if character then
        cc.CFrame = character.Head.CFrame
        cc.CameraType = Enum.CameraType.Custom
    end
end)

i dont even think you need to add the cc.CFrame = character.Head.CFrame part

1 Like

Thanks, that worked amazingly!
robloxapp-20230902-1713480.wmv (1.9 MB)

1 Like

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