How can you loop this animation? the remote event is linked to when the player is seated.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/asset/?id=507771019"
local loadedanimation = game.Workspace[player.Name].Humanoid:LoadAnimation(anim)
loadedanimation.Looped = true
loadedanimation:Play()
end)

2 comments
If it doesn't work for some reason, use an Animation Event a milisecond before the end of the animation instead of a Stopped event.
If you want to learn to use Animation Events, search here: https://developer.roblox.com/en-us/articles/using-animation-editor , https://developer.roblox.com/en-us/api-reference/function/AnimationTrack/GetMarkerReachedSignal