Simple camera locker plugin (v0.2)

This is just a neat little plugin that comes in handy for camera work. This was originally for personal use, but i think it may come in handy for others, so here it is!


This can be really handy for developers that like to manipulate the camera for such things. For example; I’m creating a lobby with a locked camera looking at something, but i need to find the right angle, Well this plugin pretty much solves 10 minutes of fidgeting with the camera CFrame and all that.

Another example being that i wan’t to create a cutscene with parts as nodes for the camera to follow. Well this plugin gots ya covered, just move your camera to your desired position and angle, and than press the second button to create a part that faces to where you were initially facing!

The camera locker plugin allows you to select any BasePart and snap your camera to that part, relative to it’s CFrame.

To do so, all you have to do is select a part, and then press the button with the camera icon (image).

Oh, and to free your camera, all you have to do is move it. So don’t worry, its not permanently locked :smile:

There’s also another button (image) that allows you to create a part, relative to your camera’s CFrame.

Link to the plugin:

The plugin it self:
Camera locker.rbxmx (2.6 KB)

The source code
plugin = plugin -- All this does it remove that annoying blue line you see 24/7

local Camera = workspace:WaitForChild("Camera")

local Selection = game:GetService("Selection")

local version = script.Parent:WaitForChild("Version")

local toolbar = plugin:CreateToolbar("Camera locker v" .. version.Value)
local Button = toolbar:CreateButton("Camera locker", "Select a 'BasePart' to lock your camera", "rbxassetid://51505696")
local Button2 = toolbar:CreateButton("Create part at camera", "Create a part at your camera", "rbxassetid://413369028")

-- Functions
	local SelectedPart = Selection:Get()[1]
	if SelectedPart and SelectedPart:IsA("BasePart") then
		Camera.CameraType = "Scriptable"
		Camera.CoordinateFrame = SelectedPart.CFrame
		Camera.CameraType = "Custom"
		print("Moved camera to: " .. SelectedPart.Name)
		warn("Please select a valid 'BasePart' to lock your camera")

	local Part ="Part")
	Part.CFrame = Camera.CFrame
	Part.Transparency = 0.5
	Part.BrickColor = BrickColor.Red()
	--Part.Size =, 1, 1)
	Part.FrontSurface = Enum.SurfaceType.Hinge
	Part.CanCollide = false
	Part.Anchored = true
	Part.Name = "CamPart"
	Part.Parent = workspace

print("Successfully loaded Ethanthegrand14's Camera part")

Quick question I do not understand how this would help me as a Devloper. So all it does is keep your camera at one possion.

1 Like

This can be useful for developers that often use the camera instance, like for cutscenes for an example. I can use the second button to create a bunch of parts that i can use as nodes!

Also you can lock your camera on rotated parts, Don’t why you’d need to do this, but you can!

This is pretty neat. Simple, but may be effective for some camera work I need to do on my game.

Sometimes, simple is best. And it definitely applies here.

Good job!