How would I go about making a top down game camera?

So I’m making a zombie shooter type game and I was wondering how I would go about making a top down camera similar to these!
Made my @Kennycell




Note: I am a dev in training and I can build but when it comes to scripting I can read and edit scripts to fit what I want them to do but I cant create scripts from scratch


Lock the camera and set the FoV somewhere in the 15-30 from your preference.

original 70 FoV

20 FoV

Properties of the FieldofView “Camera” can be found in Workspace

To lock the camera you could set the CameraType property to Enum.CameraType.Scriptable
Then bind a function to the RenderStepped event of RunService that sets the camera’s CFrame.

If you wanted the camera to look down diagonally in an isometric style you could construct the CFrame like this:

local lookAt = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
local camDistance = 20
workspace.CurrentCamera.CFrame = * CFrame.fromOrientation(math.rad(-45), math.rad(45), 0) *, 0, camDistance)
1 Like

Wrote up a sample localscript:

local rs = game:GetService("RunService")
local player = game:GetService("Players").LocalPlayer
local distance = 30
local cf = CFrame.fromOrientation(math.rad(-45), math.rad(45), 0) *, 0, distance)

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable

rs:BindToRenderStep("camLock", Enum.RenderPriority.Camera.Value + 1, function()
	if (player.Character and player.Character:FindFirstChild("HumanoidRootPart")) then
		workspace.CurrentCamera.CFrame = * cf


When I used that code in a script in the camera, it didn’t work. (I’m a total scripting noob so please explain as well as you can)

1 Like

From the wiki page on LocalScripts:

A LocalScript will only run Lua code if it is a descendant of one of the following objects:

  • A Player’s Backpack , such as a child of a Tool
  • A Player’s character model
  • A Player’s PlayerGui
  • A Player’s PlayerScripts .
  • The ReplicatedFirst service

What I normally do is put them in the PlayerScripts folder inside game.StarterPlayer, if the script isn’t associated with any tool or GUI object.


Does it matter which object I put it in?

1 Like

As long as it is in any of those places where local scripts can run, although StarterPlayer.StarterPlayerScripts is the most appropriate place for it in my opinion.

Okay! Thanks for the help! :heart::heart::heart:

1 Like