How to change sitting animation

Hey, can someone help me making a sitting animation. I already searched everywhere like on youtube google ect…
It give me the exact same script and it’s not working, the animation load for a single second then nothing happen. I already enabled looping in my animator plugin but nothing changes.

I also tried different scripts but nothing same problem it load for a single second.

I’m not sure where the problem is coming from. it isn’t giving me any error or something like that.
here is the animation ID (that I made) : 8026864558
here is the script :

seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		human = child.part1.Parent:FindFirstChild("Humanoid")
		if human ~= nil then
			anim = human:LoadAnimation(seat.sitanim)
			anim:Play()
		end
	end
end

function removed(child2)
	if anim ~= nil then
		anim:Stop()
		anim:Remove()
	end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)

Thanks for reading :smiley:

2 Likes

Go into the Animate script and edit the sitting animation there.

Is your animation priority set to Action?

I don’t think so can you help me making it ?

seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		human = child.part1.Parent:FindFirstChild("Humanoid")
		if human ~= nil then
			anim = human:LoadAnimation(seat.sitanim)
            anim.Priority = Enum.AnimationPriority.Action
			anim:Play()
		end
	end
end

function removed(child2)
	if anim ~= nil then
		anim:Stop()
		anim:Remove()
	end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)
2 Likes

Same problem D:
it load only for a second.
Is the problem coming from the animation ?

Most likely, make sure it is looped and it’s priority is set to action.
If this is all set, no clue.

Oh, I tried everything even : anim.looped = true
but it’s not working :frowning:
thank you anyway.

I’m talking about the animation when it’s in the editor, not in the script.

It’s preferred if you try to instead use the Animator object as opposed to Humanoid for loading animations.

i have this model i think it might help you

1 Like