What do you want to achieve? Bringing the camera more forward so it looks more realistic.
What is the issue? How should i bring the camera depth more forward?
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried to offset but it failed to do so, and i did look for solutions, but i did
-- important code
Camera.CameraSubject = Head
-- renderstep
RunService.RenderStepped:Connect(function(delta)
hrp.CFrame = CFrame.lookAt(hrp.Position, Vector3.new(Mouse.Hit.X, hrp.Position.Y, Mouse.Hit.Z))
end)
Try this instead, this script will make it easier to adjust the camera depth. To adjust the depth, change the FirstPersonForwardDepth variable to a number. The higher the number, the more forward the camera will be to the rest of the body.
local Player = game.Players.LocalPlayer
local FirstPersonForwardDepth = 1 -- change these two variables to your liking
local LockPlayerInFirstPerson = true
if LockPlayerInFirstPerson == true then
Player.CameraMode = Enum.CameraMode.LockFirstPerson
end
local function FirstPerson(Character)
for Index, BodyPart in pairs(Character:GetChildren()) do
if BodyPart.Name ~= "Head" and BodyPart:IsA("BasePart") or BodyPart:IsA("MeshPart") then
BodyPart:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
local Humanoid = Character:WaitForChild("Humanoid")
if BodyPart.LocalTransparencyModifier == 1 then
BodyPart.LocalTransparencyModifier = 0
Humanoid.CameraOffset = Vector3.new(0, 0, -FirstPersonForwardDepth)
else
Humanoid.CameraOffset = Vector3.new(0, 0, 0)
end
end)
end
end
end
Player.CharacterAdded:Connect(function(Character)
FirstPerson(Character)
end)
if Player.Character then
FirstPerson(Player.Character)
Player.Character.DescendantAdded:Connect(function()
FirstPerson(Player.Character)
end)
end