So, I have an Obby For Admin game, and I added a security script.
I have a clone of the obby in ServerStorage.
So when someone wins admin and deletes the game with a code, the script clones the obby in ServerStorage and puts it into workspace.
I have that all set, but how am I supposed to regenerate the players?
The Player
class has a method called :LoadCharacter()
. You can use that method to effectively respawn a character without killing the character itself. Like so:
local Plyr = game.Players.TurboFusion Plyr:LoadCharacter()
Hope this helped!
Turbo started the explanation, but forgot the rest. If you want to respawn all players, use pairs, as well as the GetPlayers method.
for i,v in pairs(game.Players:GetPlayers()) do v:LoadCharacter() end