Camera script affects character's movement for some reason

Greetings, fellow earthlings.
So, I have coded this top down camera script but for whatever reason it stops the player’s character from moving.

Anti-anti zombie shooter - Roblox Studio (gyazo.com)

As you can see, the player can jump but not move. I got rid of the script and it fixed the movement problem but I needed the top down camera. I tried asking help from other developers but even they couldn’t figure it out since the script wasn’t related to the character’s movement. I’d like to know why this happens and how I can fix it.

wait(2)

--Services

local RunService = game:GetService("RunService")
local player = game:GetService("Players")


--Variables
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
local players = game.Players.LocalPlayer
local character = players.Character
local CamTopDown = Vector3.new(0,20,0)



--Runs function after each frame
RunService.Heartbeat:Connect(function()
	if character then
		local torso = character:WaitForChild("HumanoidRootPart") 
		cam.Focus = torso.CFrame
		cam.CFrame = CFrame.new(torso.Position + CamTopDown ,torso.Position)
	end
end)

any errors?
I think I know what may be wrong, but if there are errors I wanna know.

does the camera part of the script work?

oh sorry, didn’t know that was a video.

try describing all the player stuff first, then camera
maybe try changing the cframe of the camera using just vector3s, and just test it.

You might find an answer just by testing it and see what goes wrong if you change this about the script.

The value type of Position are Vector3 values and cam.CFrame already has vector3 values. The problem seems to lie somewhere else, will need to rewrite the script.

I went back to check why the script wasn’t working and I figured it out that naming the script “CameraScript” somehow bugs the player to stop moving so I named it something else instead and my script was working fine.