I won't give you the code because I want you to learn from implementing yourself (and that this isn't a site for full script requests), but I'll explain how to do it so you know the basics:
Use the game.Players.PlayerAdded event. When a player joins, check if a certain variable / the game's state is running or not. If it is running, call Player:Kick() on the player.
Really, since you should be using universes for this, you won't have to worry about kicking players who join after, you can just not teleport them in with TeleportService after the round begins.
You can tell when a player dies with the Player.CharacterAdded event and the Humanoid.Died event. After this, you can call TeleportService:Teleport() to teleport them back to the lobby, or Player:Kick() to kick them.
game.Players.PlayerAdded:Connect(function(Player)
end)
3 comments
oh ok thanks, I get some of it now! I will try it out.
wait does it have to be in a local script, or a normal script?
This would be done in a Script.