Our team has animated a lot of animations for all of our guns, they don’t use viewmodels, and they look pretty sick. We don’t wanna make separate sprinting animations for the guns, so I want to manipulate the animation in-game and change the cframe/position. Is this possible?
Humanoid.CameraOffset exists (this is a first person game) but that doesn’t lower the arms. It lowers the camera.
Would it be possible to just raise CameraOffset to give the illusion of lowered arms? If your characters are transparent on the client, it should work sufficiently.
You can probably play around with the CFrames of the Motor6Ds in your player’s arms, I think RightShoulder and LeftShoulder are what you’d want to use.
So an example of how you’d make my arm shoot straight up at a 90 degree angle:
I forgot to mention that we also make the arms visible in first person so they can see their player’s arms taking out the magazines, etc. And camera offset doesn’t make the head stay in the position it was.
I’ve actually found a pretty simple and acceptable, for the most part, solution! If you rig your tool right, you can make it look like this:
My code:
local UIS = game:GetService('UserInputService')
local UnloadedAnim = script:WaitForChild('Animation')
local player = game:GetService('Players').LocalPlayer
local char = player.Character
repeat wait() until char.Parent == workspace
local humanoid = char:WaitForChild('Humanoid')
local LoadedAnim = humanoid.Animator:LoadAnimation(UnloadedAnim)
UIS.InputBegan:Connect(function(i, g)
if not g and i.KeyCode == Enum.KeyCode.LeftShift then -- And maybe check if a tool is equipped too.
LoadedAnim:Play(0)
end
end)
UIS.InputEnded:Connect(function(i, g)
if not g and i.KeyCode == Enum.KeyCode.LeftShift then
LoadedAnim:Stop(0.2)
end
end)