Store the data of each fight in _G or something server sided.
Then use remotefunctions and remoteevents to render the events of the fight client sided, and to communicate the player's actions to the server.
In order to connect AI, just have it wait until _G says it is its turn, and have it call a function that emulates an AI response to the current data in _G. Then, just render its actions on the player's side as well. |