generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Ok,Can you get this to reset when everyone dies.

Previous Thread :: Next Thread 
XxXOneDirectionXxX is not online. XxXOneDirectionXxX
Joined: 06 Apr 2012
Total Posts: 18
09 Apr 2012 10:18 AM
Hi i just payed 1.3k robux for a scripter to do it but can't do it,
I will pay 450 robux if you can do it, Its for a freind but this is all i can do :L
My old account got hacked, that was he finished version as well...
So here's the script.
function EditGui(MainText)
for _, pl in pairs(game.Players:GetPlayers()) do
local mgui = game.StarterGui.GameStats.Main.GameShow
local gui = pl.PlayerGui:findFirstChild("GameStats")
local tod = gui.Main:findFirstChild("GameShow")
if gui ~= nil then
tod.Text = MainText
mgui.Text = MainText
end
end
end


function MainGame()
for i = 30, 1, -1 do
if i == 1 then
EditGui("Game will start in "..i.." second")
else
EditGui("Game will start in "..i.." seconds")
end
wait(1)
end
EditGui("Teleporting players")
wait(1)
p = game.Players:GetChildren()
for i = 1, #p do
p[i].Character.Torso.CFrame = CFrame.new(Vector3.new(-16, 4.6, 131))
wait(1)
EditGui("Game in progress")
end
end
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
09 Apr 2012 10:26 AM
[ Content Deleted ]
Report Abuse
XxXOneDirectionXxX is not online. XxXOneDirectionXxX
Joined: 06 Apr 2012
Total Posts: 18
09 Apr 2012 01:24 PM
O_O
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
09 Apr 2012 01:36 PM
you could do something like this.

_G.Alive = {} -- global table
for i,v in pairs(game.Players:GetPlayers()) do
table.insert(_G.Alive, v.Name)-- insert players into table at beggining
end

--scripty script
if #_G.Alive == 0 then
--restart
end

----------separate script ----------------------
game.Players.PlayerAdded:connect(function(pl)
repeat wait() until pl.Character
pl.Character.Humanoid.Died:connect(function()
for i,v in pairs(_G.Alive) do
if v == pl.Name then -- check if player is in table.
table.remove(_G.Alive, pl.Name) -- remove players when they die.
end
end
end)
end)

~ The inner machinations of my mind are an enigma.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image