I have a script (inside of the seat) that will animate how a player sits for better effect, but when the player exits the seat the animation plays. Here's the script I'm using:
while true do
wait()
if script.Parent.Occupant ~= nil then
print(script.Parent.Occupant.Name)
track = Instance.new("Animation")
track.AnimationId = "http://www.roblox.com/asset/? id=2982336649"
local animationTrack = script.Parent.Occupant:LoadAnimation(track)
animationTrack:Play()
elseif
script.Parent.Occupant == nil then
if track ~= nil then
track:Destroy()
end
end
end
Any help would be appreciated, thanks. :)

1 comment
you could use the GetPropertyChangedSignal method instead of a loop.