How would I make my FPS Arms play an animation

Hi! If you could help that would be great! I was wondering how I would make my fps arms play an animation such as idle, and an animation when a user clicks.

image
I have a model named “Arms” in ReplicatedFirst and a script in startercharacter scripts.

local player = game.Players.LocalPlayer
local camera = workspace.Camera
local run = game:GetService("RunService")
local arms = game.ReplicatedFirst.Arms:Clone()
run.RenderStepped:Connect(function() 
 arms:SetPrimaryPartCFrame(camera.CFrame * CFrame.new(0,-2,0))

end)

arms.Parent = camera

The code above works and the fps arms are viewable to the player. My only question is how would I make it so the arms play an animation? Help would be appreciated thanks! :+1:

1 Like

So funny occurrence how I just finished animating my arms,

But basically you firstly need your arms rigged and animated from blender, you can see the tutorials needs on youtube as this is just too long to explain in a single post.

Once you exported you animation from your FPS arms you create an animation in the arms and set the AnimationId to the Animation you created.

Make sure theres humanoid inserted into the arms as that will let us actually play the animation.

From the following code inserted in a local script you should be able to load the animations and play them:

In this instance the local script is inside the Arms Model

local Animation = script.Parent.Animation.AnimationId
local LoadedAnimation = script.Parent.Humanoid:LoadAnimation(Animation)

LoadedAnimation:Play()

I was able to rig and animate it on the roblox animating plugin would that work too?

If you animated the arms and not a standard rig then it should

image
Im getting this error…


this is how I set it up

Did you put in the ID into the animation

yes
image

Get rid of the AnimationId then

What do you mean by getting rid of the animation id?