How to make a Server-to-Client Spectating System

I know how to make a player spectate another player but I am confused on how to go about a specific but random player. So basically It is a round system, and over the course of a round some would be playing and some would be eliminated(out of the round) when the players out of round spectate; I want them to be able to spectate the Players In the Match and the spectating would change is the player they spectated got removed or the game ended.

Inside each player I put a bool value called “InMatch” I expect to fire a remote event to the server where it will create a table of all the players with InMatch set to true, then the server will fire the same remote to return the table o the client, which the client will use to spectate. Anyone have an idea of how I can implement this? Links to videos or articles will also be appreciated.

I would just use a remote event to send a list of spectate-able players to each client whenever it changes. It should be set to all the players in the match initially and updated whenever a player is removed from the match. If someone is spectating and receives a new list that doesn’t contain the player they are currently spectating, move them to spectate a different player.

1 Like