How to make Viewmodel like arms movement, only with shoulder joints?

Hello,
I was looking pretty much everywhere for this and was pretty surprised I couldn’t find it anywhere.

I need to make a script that moves the arms up/down depending where the player is looking, so when in first person it looks similar to how a viewmodel would look like. I’m not very good with math, especially trigonometry so I’m in a tough spot. Tried using AI generated code, which got somewhat close to what I needed but not quite there.

Video below is recorded in Criminality as an example:

Also:

I AM NOT LOOKING ON HOW TO MAKE A VIEWMODEL (FAKE ARMS)

1 Like

To make a viewmodel in first person look wherever the player looks, that requires no math. Basic CFrame knowledge to be honest, all you need to do is set the viewmodel’s rootjoint (e.g. humanoidrootpart) to the cam.CFrame, then offset it to make it look realistic (around the arms)

local RunService = game:GetService("RunService")
local ViewModel = game.ReplicatedStorage.ViewModel:Clone()
local Camera = workspace.CurrentCamera
ViewModel.Parent = Camera
RunService.RenderStepped:Connect(function()
ViewModel.HumanoidRootPart.CFrame = Camera.CFrame * CFrame.new(x,y,z)
end)

The easy method would be to create your own viewmodel in studio, then do make it match the player’s bodycolors/clothing you can loop through the player’s character and parent the bodycolor/clothing to the rig (this will work as long as everything is rigged properly).

Also ensure you connect the parts together via motor6ds, they have the same behaviour as weldconstraints. Except with motor6ds, you can also add animations onto the arms, welds won’t allow this.

Third person is pretty easy too, I think you need to use bodygyros. Make the arms align the camera’s CFrame. Boom.

By the way you don’t need to parent the cloned viewmodel to the camera but it’s just feels cleaner imo.

Update: (Alignorientation is the new method, bodygyros are easier though)

1 Like

Not looking for a viewmodel, pretty sure there’s plenty posts about regular viewmodels

1 Like

Yeah? So it works the same. Just gotta do other stuff aswell. Not just arm body parts.

1 Like

You can see in that video that you showed, its just the arms + head that are getting aligned. It is literally the same proccess but with an extra body part.

Look this is my viewmodel, the arms move up and down depending on where the player is looking. using basically the similiar code sample i gave you.

(Skip to 0:36-0:42 to see the arms moving up and down depending on where the player looks)

1 Like

I know it works similarly, but I’m not looking for fake arms (viewmodel).
I’m looking for shoulder joint movement (C0/C1), that’s where the math is. :sob:

Oh, but i’m pretty sure it’s basically the same. I think you’d have to make two fake arms. The upper arm will represent the shoulderjoint.

So sort of an arm split into two.

From the player’s perspective, yes it’s pretty much the same. But again, not what I’m looking for.

Bump, still need help on this.

Bump again, haven’t solved yet

Use the C0 or C1 on the shoulder joints motor6d to match the camera’s cframe, take orientation only.

I’ve tried. Got somewhat close.

1 Like

did you get a working solution? am struggling on thius

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.