Hi, I am trying to force the camera to a certain position for the main menu of my game. Unfortunately, the camera does not change its position and instead just stays with my character.
Here is the code -
local Players = game:GetService("Players")
local camera = game.Workspace.CurrentCamera
local camPart = game.Workspace.CamPart
local function playerAdded(plr)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = camPart.CFrame
end
Players.PlayerAdded:Connect(playerAdded)
for _, player in ipairs(Players:GetPlayers()) do
playerAdded(player)
end
I am assuming it has something to do with it being in the playerAdded event, but I haven’t been able to figure it out. Thanks