Advertisement
xxclawcatgaming

Roblox Vibe Game Animation Play Script

Jan 25th, 2021
9,403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. --Made by xxclawcat (Subscribe to xxclawcat Gaming on YouTube!)
  2. seat = script.Parent
  3. function added(child)
  4.     if (child.className == "Weld") then
  5.         human = child.part1.Parent:FindFirstChild("Humanoid")
  6.         if human ~= nil then
  7.             anim = human:LoadAnimation(seat.Animation) -- Animation is the name of the Animation Object (Change it to the name of your Animation Name.)
  8.             anim:Play() --Play's the animation
  9.         end
  10.     end
  11. end
  12.  
  13. function removed(child)
  14.     if anim ~= nil then
  15.         anim:Stop() --Stop's the animation.
  16.         anim:Remove()
  17.     end
  18. end
  19.  
  20. seat.ChildAdded:Connect(added)
  21. seat.ChildRemoved:Connect(removed)
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement