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

Whats wrong with my script?

plrs = game.Players:GetPlayers() maps = game.Lighting:GetChildren() numplrs = #plrs p = print function selectMAP() selectedMap = maps[math.random(1,#maps)] selectedMap.Parent = Workspace game.Workspace.Timer.Value = 301 p('1') repeat wait(1) game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1

until
game.Workspace.Timer.Value == 1 or numplrs == 1
p'2'


m = Instance.new("Message", Workspace)
if numplrs == 1 then
	m.Text = "The winner was: "..plrs[1]
		wait(5)
		m:Destroy()
		selectedMap:Destroy()
		script.Disabled = true
end
if game.Workspace.Timer.Value == 1 then
	m.Text = "There was no winner, time ran out."
	wait(5)
	m:Destroy()
	selectedMap:Destroy()
	script.Disabled = true		
end
p'3'

end while wait() do for i,v in pairs(game.Players:GetPlayers()) do if v.Character.Humanoid.Health == 0 then table.remove(plrs,i) p'4' end end end function tp() local spawns = selectedMap.Spawns for i = 1, numplrs do plrs[i]:MoveTo(spawns[i].Position) p'5' sword = game.ServerStorage["Sword"] end end if Workspace.GoReady.Value == true then selectMAP() p'6' tp() p'7' Workspace.GoReady.Value = false end -- You see, It doesn't even print anything ):

1 answer

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