Move camera forward in first person?

Hello Im currently trying to move the players camera forward in first person so it’s not just in the middle.

local RunService = game:GetService("RunService");
local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();
local Camera = game.Workspace.CurrentCamera;
local Head = Character:WaitForChild("Head");
local FPMaximumDistance = 0.6;
local FirstPersonLocalTransparency = 0;
local ThirdPresonLocalTransparency = 0;

local function SetCharacterLocalTransparency(transparency)
	for i,v in pairs(Character:GetChildren()) do
		if (v:IsA("BasePart")) or v:IsA("Part") then 
			if v.Name == "Right Arm" or v.Name == "Left Arm" then 
				v.LocalTransparencyModifier = 1;
			else
				v.LocalTransparencyModifier = transparency;
			end
		end
	end
end

Camera.CFrame = Camera.CFrame + (Camera.CFrame.LookVector * 5)

RunService.RenderStepped:Connect(function()
	SetCharacterLocalTransparency(FirstPersonLocalTransparency);
end)

LocalTransparencyModifier is outdated
While regular roblox camera uses it interanally you should not and use regular transparency instead.
Did you meant?

local offset = CFrame.new(5,0,0)
Camera.CFrame *=offset 

?
Otherwise just change camera offset in humanoid.
doing game.Workspace does opposite of good
global workspace is guanteed to be loaded even in ReplicatedFirst and more so you are not even getting it from GetService so it gets even dumber

3 Likes

Okay dang you didn’t have to roast me. But yes the humanoid part was correct.

1 Like

Not trying to roast you
Nothing personal that just the way i speak
Not trying to offend anybody.

1 Like

It’s alright I didn’t take it personally :sweat_smile: I was just joking thanks though

1 Like

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