How can I make a spectator mode?

How do I use this to make a spectator mode?

There is actually already a spectator mode implemented in Unreal Engine. If there are now characters in the scene, it defaults to the spectator mode. You can see this in the GameMode Settings. I would suggest that you open up that file to view it’s contents.