Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can you reload/re-spawn a player after a round of a game?

Asked by
TheePBHST 154
7 years ago
Edited 7 years ago

I was wondering if there is a way that all of the players in the match being reloaded when it's finish.

For a example: A round is finished after the 60 seconds. Then, the player that is on that team gets teamed to Lobby and they are reloaded/re-spawned to remove their tools or to clear up anything from the round.

1 answer

Log in to vote
0
Answered by 7 years ago

You could simply just loop through ever player, and check if they're on the winner team(presumbly just have a boolean value inside each player somewhere, and if their team won it will be true, or not its false) and if they're on the winner team, change their team to "Lobby" team, then just either teleport them, or kill them(not really sure what you meant 100%)

Killing them will result in their tools being reset(if its not put in starterpack), or if you want to just teleport them and remove their tools, just scan again, loop through the winner teams backpack and just delete every tool you find.

Ad

Answer this question