When a player joins for the first time, setting camera position fails

I need a players camera to stay in one position the majority of the time, so I do this, naturally:

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
local cameraC = game.Workspace.CameraPart.CFrame
workspace.CurrentCamera.CFrame = cameraC

It works fine otherwise, but the very first time a player joins my game, the camera isn’t set properly. It remains in their control despite me setting it to “scriptable” in the first few lines of the local script, and setting it’s CFrame to the position of a part. The script is inside starterpack.

I don’t know what causes this but it works if you add a small delay

task.wait()

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
local cameraC = game.Workspace.CameraPart.CFrame
workspace.CurrentCamera.CFrame = cameraC