Advertisement
Meizch

Animation Controller Set

Jun 29th, 2021
1,988
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.namehere)
  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