Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- LuaU
- -- did this because the old script is pretty wack
- -- also idk about this its pretty untested
- local SitAnimationObj = script.Parent.sitanim
- local seat = script.Parent
- local anim
- function Occupant_Changed(SitAnimationObj)
- return function()
- local Hum = seat.Occupant
- if Hum then
- local animator = Hum:FindFirstChild'Animator'
- anim = animator:LoadAnimation(SitAnimationObj) -- change if renamed
- anim:Play()
- elseif anim then
- anim:Stop()
- anim:Destroy()
- end
- end
- end
- seat:GetPropertyChangedSignal('Occupant'):Connect(Occupant_Changed(Occupant_Changed))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement