Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to add this to my script?

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?

1 comment

0

"deletes the game with a code"? If this is something that the adminscript you have allows you to do, you should just find the "delete" code in the admin script and remove it.

2 answers

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!

1 comment

0

You also forgot to mention you can't use the Method within a 'LocalScript'.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.