Camera Manipulation running in studio but not in the actual game

Hi! Im adding respawning to my spawn menu, and it loads fine the first time but not the second, and only in the game, this works fine in studio

fortSpawnBtn.MouseButton1Click:Connect(function()
	mainFrame.Visible = false
	local randomItem = fortSpawns[math.random(1, #fortSpawns)]

	game.Workspace:WaitForChild(player.Name):WaitForChild("HumanoidRootPart").CFrame = randomItem.CFrame
	
	game.Workspace.CurrentCamera.CameraSubject = game.Workspace:WaitForChild(player.Name):WaitForChild("Humanoid")
	wait(.1)
	game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	
	loadEvent:FireServer(player)
end)