I would like to say "I was jealous of people who could eat and talk with everyone". I tried translating it on my own and I ended up with "みんなと食べられて話せる人たちに羨ましかった。" Have I done it right? I find something off even though I think I have used every grammar correctly. Please correct me if I am wrong. Thanks
羨ましい, from what I have seen, uses が to mark the thing/person which is envied. For instance:
(私は)あなたがとても羨ましい。 I envy you so much.
So, assuming 羨ましい is good for your context (see below...), I think your sentence would be better rephrased as:
I would also consider about including an 一緒に to strengthen the “togetherness” of those people’s actions, after the と, but it is not necessary.
However, depending on the sort of jealousy, (and just sticking to い-adjectives for simple comparison), a sentence using 妬ましい (ねたましい) might be better. 羨ましい conveys an essentially a neutral/positive jealousy; while 妬ましい conveys more negative sentiment e.g. a sense of a hatred towards, and/or an inferiority complex due to that other person/thing. (See Difference between 妬【ねた】ましい and 羨【うらや】ましい, for example.)
A sentence using 妬ましい can use the same structure as the example above (i.e. 人たちが妬ましかった。).
There are also unsurprisingly other ways to express jealousy (e.g. 妬ましく思っている, 焼きもちを焼く, 嫉妬する), but those may be better saved for a question addressing those differences more specifically.