How do I make the camera move with the player but stay in a spot?

Help!

When a player joins a game, I want their camera to be stuck in one rotation (and partially position) while still being able to move.

An example of what im trying to achieve - FNaF World

I’ve tried using CameraOffset in the Humanoid but the camera would flip around weirdly when you turn around.

Any help is appreciated, thank you!

2 Likes

I worded what I wanted terribly, search up FNaF World gameplay and watch a little bit of it to understand want I mean.

I know what to do! Here’s a LocalScript.

local CameraOffset = Vector3.new(0, 10, 30)

game:GetService("RunService").RenderStepped:Connect(function()
	local Player = game.Players.LocalPlayer
	local Character = Player.Character

	if not Character then return end
	if not Character.PrimaryPart then return end

	local RootCFrame = Character.PrimaryPart.CFrame

	workspace.CurrentCamera.CFrame = CFrame.new(RootCFrame.Position + CameraOffset, RootCFrame.Position)
end)

Feel free to modify CameraOffset!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.