Greetings Developers,
Recently, a friend of mine tried to collaborate with me, to add animations to one of my showcase places.
As he finished scripting the animation and tested it, it didn’t work.
So we have tried to import the sitting animations into another place, which was owned by my friend in which the animations worked. As soon as we imported the same build with the same settings and scripts into a place of mine, the animations didn’t work again.
Here is the script:
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)