How do I lock a camera into one place?

I want to lock a players camera in first person and make it onto a chair so they’re sitting; I also want to make it so they can’t jump. Can I have some help?

1 Like

I mean like so they can’t move their camera at all

Just set the camera to scriptable, and then nothing will happen

What about disabling jumping? I need to do that too

Set their jump power to 0, it will make it so they can’t jump.

1 Like

How? Also I set the camera to that and it didn’t work

you can just set the jumping power to 0. And for walkspeed, you can just set that to 0

Here is how you would disable jumping.

local Humanoid = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid");
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)

Hopefully, this helps you :slight_smile:

2 Likes

What about the script for the camera to lock first person and not move at all

You can lock them camera by changing cameramode
here’s an example

game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

To remove their jump ability just set jumppower to 0

game.Players.LocalPlayer.Character:WaitForChild("Humanoid").JumpPower = 0

Script didn’t work

  14:45:00.890 - Workspace.Script:1: attempt to index field 'LocalPlayer' (a nil value)

Same error…

game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

This is because the script should be a localscript, and should be placed in StarterCharacterScripts.

Excuse me. You put this script in workspace this should be in client
Put in startergui or how ozdx said StarterCharacterScripts

You are having a lot of trouble with this, here is an article on the camera to help:

And one for the Humanoid:

It is best to search for answers online and the dev forum first, and learn from there on. This is a very simple task and could have been done by reading these articles.

1 Like

2 things:

  1. Is there any way to lock them onto a seat on joining the game (this is 1 player only)
  2. Any way to show their arms while in first person? (Body too if its even possible)
  1. You should remove their jumppower. Then teleport them to seat.
  2. You can change LocalTransparencyModifier of arms
  1. I have no idea how to do that

  2. Same with that

You can set the jump power here to 0 to disable jumping.
image
As for the camera, you can easily find a tutorial on youtube where you can even change the camera place just by using a block.

local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
Humanoid.JumpPower = 0 -- remove their jump
Humanoid.WalkSpeed = 0 -- remove their movement

game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(0,0,0) -- Your CFrame position of seat
-- Details: This should be executed after setting cam to firstperson or make loop that will change transparency
--R6
local Character = game.Players.LocalPlayer.Character
local LA = Character:WaitForChild("Left Arm")
local RA = Character:WaitForChild("Right Arm")

LA.LocalTransparencyModifier = 0
RA .LocalTransparencyModifier = 0