How can I make the arms follow the camera

How could i make the arms follow the camera, for reference like this:

a video

images from Combat Initiation

All i have is this that only makes the arms visible

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local humanoid = char:WaitForChild("Humanoid")

function antiTrans(part)
	if part and part:IsA("BasePart") and( part.Name=="Left Arm" or part.Name=="Right Arm") then 
		part.LocalTransparencyModifier = part.Transparency
		part.Changed:connect(function (property)    
			part.LocalTransparencyModifier = part.Transparency
		end)
	end
end

for _,v in pairs(char:GetChildren()) do
	antiTrans(v) 
end
2 Likes

I think they use a view model to make the arms move that perfectly

1 Like

can viewmodels play a animation? because it does here

2 Likes

Viewmodels can have animations. You can create them just as normal using the animation editor. If you need a tutorial online just search up viewmodel tutorial and you should find plenty of resources that will go through the process!

1 Like

yea I did it this way:

for _,v in Viewmodel:GetDescendants() do
			if v:IsA("Motor6D") and v.Name:find("Shoulder") then
				for _,b in Character:GetDescendants() do
					local f = false
					if b:IsA("Motor6D") and b.Name == v.Name then
						f = true
						v.CurrentAngle = b.CurrentAngle
						v.Transform = b.Transform
					end

				end
			end
		end
2 Likes

I believe that Roblox immediately resets the local transparency. Instead, change the local transparency every frame(this will not affect performance). Try this:

--[Services]-----
local PS = game:GetService("Players")
local RS = game:GetService("RunService")

--[Variables]-----
local LocalPlayer = game.Players.LocalPlayer
local LocalCharacter = LocalPlayer.Character

--[System]-----
function MakeVisibleAppendages()
	-- Makes arms and legs to visible
	if LocalCharacter then
		-- Assuming your using R6
		LocalCharacter["Right Arm"].LocalTransparencyModifier = 0
		LocalCharacter["Left Arm"].LocalTransparencyModifier = 0

		LocalCharacter["Right Leg"].LocalTransparencyModifier = 0
		LocalCharacter["Left Leg"].LocalTransparencyModifier = 0
	end
end



--[Connections]-----
RS.RenderStepped:Connect(MakeVisibleAppendages)

3 Likes

just a question can you still do view models when your camera mode is set to classic?

in first person, yes

actually you can do them in third aswell, but why would you

is there a better solution? like just a script

hey! i was researching and i found this script

wait()

local player = game.Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
	character = player.CharacterAdded:wait()
end
local humanoid = character:WaitForChild("Humanoid")
local torso = character:WaitForChild("Torso")
local rightShoulder = torso:WaitForChild("Right Shoulder")
local leftShoulder = torso:WaitForChild("Left Shoulder")
local camera = game.Workspace.CurrentCamera

updateSpeed = 0.15

game:GetService("RunService").RenderStepped:Connect(function()
	local camCF = camera.CoordinateFrame
	local distance = (character.Head.Position - camCF.p).magnitude
	if distance <= 1 and humanoid.Health ~= 0 then
		rightShoulder.C0 = rightShoulder.C0:lerp((camCF * CFrame.new(1, -1, -1)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, math.pi/2, 0), updateSpeed)
		leftShoulder.C0 = leftShoulder.C0:lerp((camCF * CFrame.new(-1, -1, -1)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, -math.pi/2, 0), updateSpeed)
	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)

local char = game.Players.LocalPlayer.Character

for childIndex,child in pairs(char:GetChildren()) do
	if child:IsA("BasePart") and child.Name == "Left Arm" or child.Name == "Right Arm" then

		child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()

			child.LocalTransparencyModifier = child.Transparency

		end)

		child.LocalTransparencyModifier = child.Transparency

	end
end

put on startergui

1 Like

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