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

How can I make everybody in workspace respawn? [Unsolved!]

How can I make everyone in workspace removed from workspace then in the amount of time given they respawn?

2 answers

for i,v in pairs(game.Players:GetPlayers()) do
v:LoadCharacter(true)
end
local waitTime = 60 -- how many seconds before respawn

for i,v in pairs(game.Players:GetChildren()) do 
	if v.Character.Parent == game.Workspace then
		clone = v.Character:Clone().Parent = game.Lighting
		v.Character:Destroy()
	end
	wait(waitTime)
		for _,plrs in pairs(game.Lighting:GetChildren()) do
			if plrs:IsA("Model") then
				plrs.Parent = game.Workspace
		end
	end
end

		
		

1 comment

0

Dont get it?

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