Background: I’m playing around with creating the atmosphere for a horror game, and I locked the player’s perspective into 1st person. I also wanted the player’s character to be visible, so I set up a code that sets the legs, arms, and torso’s LocalTransparencyModifier to 0.
However, the 1st person camera is located directly in the middle of the player’s head, meaning that the torso and neck stump are located directly below the camera and slightly in-frame. I want the torso and legs to be visible because the POV would look weird without them.
The question: I was wondering if I could set the player’s camera to be slightly more-forward that the default 1st person POV by about a stud, to put it realistically where their eyes would be.
I tried setting the min-max camera zoom distance to 0.6 to 1 instead of 0.5, but that puts the camera behind the player’s head instead of in front of it. I also tried manually positioning the camera’s CFrame, but it would either reset to the default POV as soon as I move my head, or constantly spin if I tried to set it’s position in a constant loop. Changing the CameraSubject also prevents the player’s character from walking properly.
local runService = game["Run Service"]
local plr = game.Players.LocalPlayer
local stores = {"Right Arm", "Right Leg", "Left Arm", "Left Leg", "Torso"}
runService:BindToRenderStep('Camera', 1000000, function()
local char = plr.Character
if char then
for i, part in char:GetChildren() do
if table.find(stores, part.Name) then
part.LocalTransparencyModifier = 0
end
end
local camera = workspace.CurrentCamera
local newFrame = char.Head.CFrame * CFrame.new(Vector3.new(1,1,1))
camera.CFrame = newFrame
end
end)
This just makes the camera spin around…