Advertisement
Drvays

Custom Sit Animation Script

May 29th, 2024
24,527
5
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 5 0
  1. local Seat = script.Parent
  2. local Anim = script.Parent:FindFirstChildOfClass("Animation")
  3. local LastAnim = nil
  4.  
  5. Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
  6. if Seat.Occupant == nil and LastAnim ~= nil then
  7. LastAnim:Stop()
  8. else
  9. LastAnim = Seat.Occupant.Parent:FindFirstChild("Humanoid"):LoadAnimation(Anim)
  10. LastAnim:Play()
  11. end
  12. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement