i have an animation in a seat that replaces the sitting animation when you sit in the seat this works for me. Only me. my friend tries it and it outputs as if everything were to be working but the animation dose not play this is my script:

seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		print("weld")
		local human = child.part1.Parent.Humanoid
			print("ani loading")
			anim = human:LoadAnimation(seat.Animation)
			anim:Play()
			print("ani played")
		
	end
end

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

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

2 comments

0

You can check when the occupant of the seat is changed instead of using ChildAdded.

0

Also, if your friend is testing in Studio, it may be the fact that he doesn't own the animation.