Help with weird bug on tool animation

I’m making this tool that has an idle animation. It uses a Motor6D to connect to the player’s arm. The problem is that the tool’s idle animation won’t play until another animation plays.

  1. What do you want to achieve?

Fix that (pretty obvious lol)

  1. What is the issue?

Already said it, here’s a video of it:

  1. **What solutions have you tried so far?

I’ve tried to organize the code more and move the animations part to another script.

Code:

local plr = game.Players.LocalPlayer
local Cooldown = false

script.Parent.GivePlayer:FireServer(plr)

--repeat wait() until game.Players.LocalPlayer.Character
local char1 = plr.Character

local Anim = char1.Humanoid:LoadAnimation(script.Parent.Anim)

script.Parent.Equipped:Connect(function()
	
	Anim:Play()
	
	game.ReplicatedStorage.ConnectM6D:FireServer(script.Parent.Handl) -- Change to grip thing
	--script.Parent.ValueUpdater:FireServer(script.Parent.Using, true)

end)

script.Parent.Unequipped:Connect(function()
	
	Anim:Stop()
	
	game.ReplicatedStorage.DisconnectM6D:FireServer()
	--script.Parent.ValueUpdater:FireServer(script.Parent.Using, false)

end)

H~

1 Like

alright so here what i think the issue is your playing the Animation BEFORE you add the Motor6D
for the animation.

yeah so try running this;

before you play the animation maybe. since the only reason why it stops like that becuase the animation “relies” on the Motor6D your creating with that remote event.

Maybe the problem is the acuatlly animation setting, for example in the animation settings you can change the animation type to, action, core, idle, movement, you need to set the animation to “Action”

To fix this, add a Motor6D into the body part the animation expects the Motor6D to go. You then connect the Motor6Ds from the client and the server when they equip the tool, and delete those right arm attachments and I think a weld if they’re in there.

The original script was like that (before I organized it), the bug was there still. I’m going to do that anyways, but I doubt It’ll do anything. Thanks for the reply though : D

It’s set to Action 2… I’m pretty sure that works too, right?

1 Like

I’m sorry, I have a really tiny brain… Do you mean I attach the tool to another rig through a Motor6D to animate it…? (That’s what I did to animate the tool)

The first action will be alright to use. I don’t exactly know why they added more actions, but I never use them. But I use this code and put it in a module for my Motor6D tools:

module.Connect = function(sp)
	if sp.Parent:FindFirstChild("Right Arm") then
		if sp.Parent["Right Arm"]:FindFirstChild("RightGripAttachment") and sp.Parent["Right Arm"]:FindFirstChild("RightShoulderAttachment") then
			sp.Parent["Right Arm"].RightGripAttachment:Destroy()
			sp.Parent["Right Arm"].RightShoulderAttachment:Destroy()
		end
		sp.Parent["Right Arm"].Motor6D.Part1 = sp.BodyAttach
	end
end

module.Disconnect = function(char)
	if char:FindFirstChild("Right Arm") then
		if char["Right Arm"]:FindFirstChild("Motor6D") then
			char["Right Arm"].Motor6D.Part1 = nil
		end
	end
end

I’m pretty sure this module should go in ReplicatedStorage so the client and the server can access it.