Two pieces of code sometimes work and sometimes don't, after editing seemingly unrelated code

I’m trying to remove the player character when they join by moving them into ServerStorage but it sometimes works and sometimes doesn’t.

Here’s the first few lines of the script that does so:

local players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local DataStoreService = game:GetService("DataStoreService")
local dataStore = DataStoreService:GetDataStore("test14")
local gameStats = dataStore:GetAsync("game")

local HTTPService = game:GetService("HttpService")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		char.Parent = ServerStorage.PlayerCharacters
		ReplicatedStorage.GetList:FireClient(player, HTTPService:JSONDecode(dataStore:GetAsync("list")))
	end)
end)

Also, after editing seemingly unrelated code, my camera is no longer set to “Scriptable”
(local script)

local players = game:GetService("Players")
local player = players.LocalPlayer
local camera = game.Workspace.CurrentCamera

camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CFrame.lookAt(Vector3.new(0, 10, -20), Vector3.new(0, 0, 10))

I know these are pretty short code segments but this is all that it should take in order to get these done right?

Why are you trying to remove them?

I don’t want the player character to be a part of the game? I don’t need to see or use them so I’m just putting them in serverstorage to make it easier

You can disable players from spawning into the game with the CharacterAutoLoads property under the Players service.