Why isn't the animation working in correlation to the actual one?


The Animation I have doesn’t seem to work properly, when I do it, the rock doesn’t actually move and just teleports to my body.


-- \\ P-Prompt // --

local PU = script.Parent

local ROC = script.Parent.Parent

-- \\ Functions // --

PU.TriggerEnded:Connect(function(Player)
	local RF = game:GetService("ReplicatedFirst")

	local Rock = RF.Animations.PickUpRock

	local RockAnim = Player.Character.Humanoid.Animator:LoadAnimation(Rock)
	print(Player)
	print("It works?")

	RockAnim:Play()
	local Weld = Instance.new("Motor6D")
	Weld.Parent = Player.Character.HumanoidRootPart
	Weld.Part0 = Player.Character.HumanoidRootPart
	Weld.Part1 = ROC

	print("Oomph!")



end)

I’m just tryna fix this at the moment.

If you need the Motor6D to play your animations then you should probably create it before you play the animation. Not sure though.

No, it still doesn’t work, even if the Motor6D is put prior, nothing changes. Along with that, my movement animation doesn’t seem to work along with it, in which you should be crouching down and carrying the rock.

Did you make sure the animation priority is action?

try this

-- \\ P-Prompt // --

local PU = script.Parent

local ROC = script.Parent.Parent

-- \\ Functions // --

PU.TriggerEnded:Connect(function(Player)
	local RF = game:GetService("ReplicatedFirst")

	local Rock = RF.Animations.PickUpRock

	local RockAnim = Player.Character.Humanoid.Animator:LoadAnimation(Rock)
	print(Player)
	print("It works?")

	RockAnim:Play()
    RockAnim.Stopped:wait()
	local Weld = Instance.new("Motor6D")
	Weld.Parent = Player.Character.HumanoidRootPart
	Weld.Part0 = Player.Character.HumanoidRootPart
	Weld.Part1 = ROC

	print("Oomph!")



end)

I made the movement animation a Movement Priority, not action.

Once I get on my computer tomorrow I will try that out.

Not really any changes I saw once I did it. It’s very odd. It’ll stop for a moment and then continue.