Animation being interrupted by idle animation

I have a script that plays an animation, despite setting the weight to a very high value, it never plays

local UIS = game:GetService("UserInputService")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://6745090063"
for i , v in pairs(anim:GetDescendants()) do
	if v:IsA("Pose") then
		v.Weight = 1000
	end
end
local loadanim = script.Parent:WaitForChild("Humanoid").Animator:LoadAnimation(anim)
UIS.InputBegan:Wait()
loadanim:Play()

Make sure that the idle animation’s priority is lower than the animation you’re trying to play. I’d suggest changing the idle animation’s priority to “idle” and the one you’d like to play to “action”.

1 Like

Ok, but how exactly can I do that if its a property of keyframesequence? do i change it before saving?

I would recommend checking out AnimationTrack:AdjustWeight()

1 Like

if im not wrong, change the animation type to ‘movement’

Keep in mind the idea behind weighted animations is that you are given the ability to have multiple animations running simultaneously, all with the same animation priority.

1 Like

I’m aware that you marked my response as the solution, but I may still be able to answer your questions; even as a property of keyframesequence, its priority can still be changed. As for changing it before saving, if you are referring to the animation, simply just change the animation’s priority, save it, and you shouldn’t have to change much else in the script. I assume you already know this now, but, y’know, food for thought.

2 Likes