Issues with character and camera

Hi! I am having a problem, I need to make the whole body of my local player visible (except head and torso) and change the camera position, any ideas how to do it?

What should I do with these two variables to change those values?

local cameraPosition
local fp_Mode_Visible

Here I attach the full local script:

local uis = game:GetService("UserInputService")

local player = game.Players.LocalPlayer

local isActive = false

local cameraPosition
local fp_Mode_Visible

uis.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E and isActive == false then
		player.CameraMode = Enum.CameraMode.Classic
		isActive = true
		print('Classic Mode')
	elseif input.KeyCode == Enum.KeyCode.E and isActive == true then
		player.CameraMode = Enum.CameraMode.LockFirstPerson
		isActive = false
		-- change camera position here
		-- make all character visible except head and torso here
		print('LockFirstPerson Mode')
	end
end)
1 Like
1 Like

Thank you! It worked for me, and how could I change the position of the camera? :smiley:

You would change CameraOffset

player.Character.Humanoid.CameraOffset = Vector3(0,0,0)

Then you can return it by setting it back to 0,0,0.

Thanks! :smiley: but if I look down, how can I limit the view?

Could you elaborate on that a bit?

For example, when I look down with my player I do not want to see my legs, I would like to limit the visual field when i’m looking down, how can I do something like that?

Check the player’s head LookVector (read here) and change the Camera.FieldOfView in workspace.

1 Like