[Unsolved] How would I make the arms not look chopped off?

Hello, I am making a battle game and want it to be in first person. I made a script to make the players head and arms move along with the camera, the head works well and so do the arms, but whenever I look up they are to close to the camera, and when I look down, they look like they are floating. Any help would be appreciated :slightly_smiling_face:

Video of the issue
robloxapp-20220806-2016180.wmv (2.2 MB)

My script (local script in the character)

local player = game.Players.LocalPlayer
local camera = game.Workspace.CurrentCamera
local neck = script.Parent:FindFirstChild('Neck', true)
local yOffset = neck.C0.Y
local yOffset2 = script.Parent:WaitForChild('Torso'):WaitForChild('Right Shoulder').C0.Y
local yOffset3 = script.Parent:WaitForChild('Torso'):WaitForChild('Left Shoulder').C0.Y
local humanoid = script.Parent:WaitForChild('Humanoid')

game:GetService('RunService').RenderStepped:Connect(function()
	script.Parent['Right Arm'].LocalTransparencyModifier = 0
	script.Parent['Left Arm'].LocalTransparencyModifier = 0
	if script.Parent:WaitForChild('Humanoid').Health > 0 then
		local cameraDirection = script.Parent.HumanoidRootPart.CFrame:ToObjectSpace(camera.CFrame).LookVector
		neck.C0 = CFrame.new(0, yOffset, 0) * CFrame.Angles(3 * math.pi/2, 0, math.pi) * CFrame.Angles(-math.asin(cameraDirection.Y), 0, 0)
		script.Parent.Torso['Right Shoulder'].C0 = CFrame.new(1, yOffset2, 0) * CFrame.Angles(math.asin(cameraDirection.Y), math.rad(90), 0)
		script.Parent.Torso['Left Shoulder'].C0 = CFrame.new(-1, yOffset3, 0) * CFrame.Angles(math.asin(cameraDirection.Y), math.rad(-90), 0)
	end
end)
2 Likes

I think you can get around the floating by making scaling the arms bigger or longer

I don’t really think scaling the arms would fix the problem, whenever I move a part that is connected to a motor6D the motor6D just disappears. I’ve seen a game called Survive and kill the killers in area 51!!! do exactly what I’m trying to do

You will need to use FPS arms.

I don’t really like using fps arms. I’d much rather use real arms because they save the hassle of trying to put textures and welds to the fps arms

I want to make something like this, where the arms don’t look detached or too close to the camera, except they move with the camera instead of mouse
robloxapp-20220810-1057534.wmv (1.8 MB)

I’m still stuck on this issue, if anyone could help I’d appreciate it

There seems to be a open sourced resource out there that could help with this: Realism — Make your games feel more immersive!
Not sure if it would work for your use case but you could try!

Ok so using that I have made a script that does exactly what I want it to do, but for some reason it makes my arms move horizontally aswell

robloxapp-20220819-1744000.wmv (1.9 MB)

my current script:

local player = game.Players.LocalPlayer
local humanoid = script.Parent:WaitForChild('Humanoid')
local humanoidRootPart = script.Parent:WaitForChild('HumanoidRootPart')
local rightShoulder = script.Parent:WaitForChild('Torso'):WaitForChild('Right Shoulder')
local leftShoulder = script.Parent:WaitForChild('Torso'):WaitForChild('Left Shoulder')
local rightOrigin = rightShoulder.C0
local leftOrigin = leftShoulder.C0

game:GetService('RunService').RenderStepped:Connect(function()
	local cameraCFrame = game.Workspace.CurrentCamera.CFrame
	if humanoid.Health > 0 then
		rightShoulder.C0 = (cameraCFrame * CFrame.new(1, -1, -0.5)):ToObjectSpace(humanoidRootPart.CFrame):Inverse() * CFrame.Angles(0, math.pi / 2, 0)
		leftShoulder.C0 = (cameraCFrame * CFrame.new(-1, -1, -0.5)):ToObjectSpace(humanoidRootPart.CFrame):Inverse() * CFrame.Angles(0, -math.pi / 2, 0)
	else
		rightShoulder.C0 = CFrame.new(1, 0.5, 0) * CFrame.Angles(0, math.pi / 2, 0)
		leftShoulder.C0 = CFrame.new(-1, 0.5, 0) * CFrame.Angles(0, -math.pi / 2, 0)
	end
end)

Try playing around with the CFrames until it seems right? I’m really not sure why it wouldn’t be working besides the possibly wrong CFrames.

I’ve tried messing with the CFrames, still nothing. When I put the code in a while loop instead of a renderstepped function it fixes the issue but makes the arms choppy

Could you show how “choppy” the arm movements are?

robloxapp-20220820-1810129.wmv (1.7 MB)
I want the arms to instantly be positioned, but it’s like my arms are lagging

Ok so I went back to the RenderStepped way because I don’t want a delay when the player looks around. I might try to convert the CFrame to a Vector3 and then into a new CFrame if I can find a way

i use this for my fps arms:

local camCF = workspace.CurrentCamera.CFrame
rsh.C0 = rsh.C0:lerp((camCF * CFrame.new(1,-1.2,-1)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, math.pi/2, 0), 0.5)
lsh.C0 = lsh.C0:lerp((camCF * CFrame.new(-1,-1.2,-1)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, math.pi/-2, 0), 0.5)

Still the same thing, just makes my right arm face upwards

Ok so I tried doing the new CFrame method, still doesn’t work. I’ve seen a game called Survive and kill the killers in area 51 do exactly what I’m trying to make with their guns, so I know it’s possible

Bumping this because I still haven’t found a solution