How do I replicate Real Arm movements to Fake Arms (ViewModel)?

So, i tried making a viewmodel script from the code snippets and the repro file that colbert2677 gave and made my own modifications to it, but it doesn’t work correctly, and the topic has no further information on the script after Hexcede’s conclusion on the viewmodel problem.

local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local RenderStepped = game:GetService("RunService").RenderStepped
local ViewModel = game:GetService("ReplicatedStorage").ViewModel:Clone()
local ViewModelRoot = ViewModel.PrimaryPart
local ViewModelTorso = ViewModel.Torso

ViewModel.Parent = workspace

RenderStepped:Connect(function ()
	ViewModelRoot.CFrame = workspace.CurrentCamera.CFrame * CFrame.new(0, -1.5, 0)
	-- Hardcoded logic test
	ViewModelTorso["Left Shoulder"].Transform = Character.Torso["Left Shoulder"].Transform
	ViewModelTorso["Right Shoulder"].Transform = Character.Torso["Right Shoulder"].Transform
	ViewModelRoot["RootJoint"].Transform = Character.HumanoidRootPart["RootJoint"].Transform
if Character:FindFirstChildOfClass("Tool")~= nil then
	Character.Torso.ToolGrip.Part1 = nil
	ViewModelTorso.ToolGrip.Part1 = Character:FindFirstChildOfClass("Tool").BodyAttach
	ViewModelTorso.ToolGrip.C0 = ViewModelTorso.ToolGrip.C0 * CFrame.new(0,0,0)
end
end)

my viewmodel also uses HumanoidRootPart instead of Torso, as the animations i use contain torso rotations.
image

2 Likes

Make sure you have the viemodel in a seperate collision group, if that doesnt work then I can show you my version of it!

the collision i’m having in the video is actually the tool itself rather than the viewmodel.
I’m having difficulties changing the motor6D’s to the viewmodel, but you could show me your version, too, if that’s okay.

The only problem is when you equip a tool and look upwards, the tool doesnt move with the arms.

So you’re saying that it works when the viewmodel primary part is the Torso?
Becouse by me the tool dosn’t move a single stud.

1 Like

Alright, I know I’m very late. BUT. I found a resource that uses the real arms like viewmodels. Just putting this out here so that other people don’t have to go thru this pain.

[Only for R6 though]

2 Likes