Animation wont play?

I’m making an idle animation for a character. It has a sword and a sheath aswell which iv accounted for but it still wont play? Heres a clip of what happens. It should play at the start.

I’m not using the startercharacterscript and setting the idle animation as I will have multiple playable characters. Here is my code if anyone could help me work out what’s wrong? I also used moon animator for the animations.

local Anim = RS.Animations.SamSheathedIdle
local Players = game:GetService(“Players”)
local Player = Players.LocalPlayer
repeat wait() until Player.Character
local Char = Player.Character
local Hum = Char:WaitForChild(“Humanoid”)
local Animation = RS.Animations.SamSheathedIdle
local AnimController = Hum:FindFirstChildOfClass(“AnimationController”)
if AnimController then
local AnimTrack = AnimController:LoadAnimation(Anim)
AnimTrack:Play()
else
AnimController = Instance.new(“AnimationController”)
AnimController.Parent = Hum
local AnimTrack = AnimController:LoadAnimation(Anim)
AnimTrack:Play()
end

This is my welding script aswell incase that may be an issue

local Weld2 = Instance.new(“ManualWeld”)
Weld2.Name = “SideWeld”
Weld2.Part0 = Sword.PrimaryPart
Weld2.Part1 = Sheath.PrimaryPart
Weld2.C0 = CFrame.new(0,0,0)
Weld2.Parent = Weld2.Part0
local SwordMotor = Instance.new(“Motor6D”)
SwordMotor.Name = “Meshes/murasama1”
SwordMotor.Part0 = Char:WaitForChild(“LowerTorso”)
SwordMotor.Part1 = Sword[“Meshes/murasama1”]
SwordMotor.Parent = Char:WaitForChild(“LowerTorso”)
SwordMotor.Enabled = true
local SheathMotor = Instance.new(“Motor6D”)
SwordMotor.Name = “Meshes/murasama1”
SwordMotor.Part0 = Char:WaitForChild(“LowerTorso”)
SwordMotor.Part1 = Sheath[“Meshes/murasama6”]
SwordMotor.Parent = Char:WaitForChild(“LowerTorso”)
SwordMotor.Enabled = true

Humanoids don’t contain AnimationControllers? I believe you made a mistake, replace "AnimationController" with "Animator".

An AnimationController was a stripped down version of Humanoid to play animations. It’s useless now because you can just directly use the Animator. Parenting an AnimationController to a Humanoid will make the Animator think the character model is the humanoid.

1 Like

Thanks so much but now the idle kinda does this?

Is their a way to set the idle animation or do I have to use the StarterCharacterScript animate and set it their?

In the Animation Editor, try setting the Priority to “Movement” and re-publish the animation.

1 Like

Still the same thing, im used moon animator so that may be an issue? Do you think its best if I just use the Animate script from startercharacterscript?

image
I cant watch the video, can you make it an mp4?

I can’t find any mention of Moon Animator having priority settings, how do you even know you set the priority in the first place?

Use the built-in Animation Editor;

  1. Click on the rig you are animating
  2. If it asks you to name an animation, just enter some random name
  3. Click the three dots next to the name of the animation
    image
  4. Click on “Import” and then click on “From Roblox”
    image
  5. Select your animation and click “Submit”


6. Click on the three dots again, click “Set Animation Priority” and click “Idle”
image
7. Click on the three dots once more, and click “Publish to Roblox”
image
8. Click “Overwrite existing asset…”

9. Select the animation
10. Click “Submit”

2 Likes

Alright ill try do the same thing without moon animations thanks for the help. :slight_smile: if i get it to work ill mark this as the solution

I apologise for asking again but what’s the best way to set an idle animation with an accessory that’s connected via motor6d as the animate animate local script doesn’t seem to work neither does playing it directly as the with animation controller as it still plays whilst moving. If you could just give me some pointers on how to set the idle as the idle plays whilst the movement script.

1 Like