I wrote this script a few months ago to get the player into a pose when they sit on a seat. Now this script doesn't work anymore. How can I repair it ?
seat = script.Parent function added(child) if (child.className=="Weld") then local 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)