Advertisement
Guest User

Untitled

a guest
May 25th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. seat = script.Parent
  2. function added(child)
  3. if (child.className=="Weld") then
  4. human = child.part1.Parent:FindFirstChild("Humanoid")
  5. if human ~= nil then
  6. anim = human:LoadAnimation(seat.sitanim)
  7. anim:Play()
  8. end
  9. end
  10. end
  11.  
  12. function removed(child2)
  13. if anim ~= nil then
  14. anim:Stop()
  15. anim:Remove()
  16. end
  17. end
  18.  
  19. seat.ChildAdded:connect(added)
  20. seat.ChildRemoved:connect(removed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement