Is there a script that can change the camera to the mid upper torso?

So, I’m making a game and it’s based off of an officer’s body cam and his missions. So, I want the camera to be where a body cam would be on an officer usually being the mid upper torso. So, I was wondering if someone could help me with a script that would make the camera mid upper torso on a Roblox character. I mostly want this in the game since it is mostly supposed to be an officer’s bodycam.

What I’m wanting to do is lock the players camera to the mid upper torso, Thats the main goal of this project.

  • I Will also be hopefully creating a Devlog for this game in the near future(Like 2 months)
  • I Will also release a Bodycam system when its compete

– Thanks, MilkBandit

4 Likes

Just wrote this script really quickly. Uses the CameraMaxZoomDistance property to keep the player in first-person view. I used the CameraOffset property to move the camera focus to 1 stud beneath the head, effectively making the camera revolve around the torso.

Place this in a local script under StaterPlayer.StarterPlayerScripts:

local player = game:GetService('Players').LocalPlayer
local character = script.Parent

local humanoid = character:WaitForChild('Humanoid')

player.CameraMaxZoomDistance = 0.5 -- Lock in first person
humanoid.CameraOffset = Vector3.new(0, -1, 0) -- Move camera to torso

Good luck!

1 Like

I thank you so much for this I was trying a bunch of things some worked but not how I wanted It to(Like the camrea not moving with the player because i tried using parts lol) and so didn’t. Thanks for this it means a lot.

3 Likes

But the script does not work for some reason, i set the camera type to scriptable and did the camera type to fixed(The Default) Any reason on why this would not work?

5 Likes
local character = script.Parent
local upperTorso = character:WaitForChild("UpperTorso")

local camera = game.Workspace.CurrentCamera

local function lockToUT()
	camera.CFrame = upperTorso.CFrame
end

camera.CameraType = Enum.CameraType.Scriptable

game["Run Service"]:BindToRenderStep("CameraLock", Enum.RenderPriority.Camera.Value, lockToUT)

This script will lock yer camera to Character.UpperTorso.

2 Likes

Thank you I will try it out where would I put this piece of code?

4 Likes

Local script in StarterCharacterScript

2 Likes

Thank you :+1:

1 Like

So, none of these scripts are working and I’m starting to think it has something to do with the ACS system that i have installed forcing the camera scripts to not work. Could that be an issue?

3 Likes

Ja. Test the script I made and it does work fine. You perhaps need to override the ACD gun system camera system. Good luck on that.

On second notice, try using the script in empty baseplate and see if it work for you.

1 Like

Gottcha, I will indeed try it on an empty baseplate. I’m going to have to figure out how to override the script lol :frowning:

2 Likes

You might encounter bug while trying to override the gun system. I I remember remember correctly, ACS raycast from the origin of your head / middle of your screen.

1 Like

O, dang so i might have to do away with the acs system…

1 Like

The script works perfectly btw, but i can’t look around with my mouse but i think my studio is buged out.

It was not my studio nvm lol

  • btw thank you for helping me it means alot since im kinda new to scripting and programing in general
1 Like

Try my script again now that you got the camera system removed

Im still currently trying to remove/ Override the script since acs didt make it easy too lol. But i will ASAP