Lua used to fill a niche very similar to Javascript: small lightweight OOP language that focuses on being embedded in a larger C program. Javascript won this war, mostly based on the explosion of the Web and the insane optimization work that was put on JS engines during the late 2000s.
JS ate Lua's cake, not on pure technical merits (the two languages are very similar) but because of their respective environments.