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: Works in online, not offline. Any help?

Previous Thread :: Next Thread 
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
31 Oct 2012 09:23 AM
function killallplayers()
local playerlist = game.Players:GetChildren()
for i = 1,#playerlist,1 do
if (playerlist[i]:IsA("Player")) then
local human = playerlist[i].Character:findFirstChild("Humanoid")
if (human ~= nil) and (human.Health > 0) then
human.Health = 0
end end end end


Workspace.ClickPart.ClickDetector.MouseClick:connect(function(playerWhoClicked)
m = game.Workspace.Message
Workspace.Message.Text= ("Game Has Been Completed! Thanks to " .. playerWhoClicked.Name)
script.Parent.ClickDetector.MaxActivationDistance=0
wait(5)
Workspace.Message.Text = "New game beginning in 3.."
wait(1)
Workspace.Message.Text= "New game beginning in 2.."
wait(1)
Workspace.Message.Text = "New game beginning in 1..."
wait()
Workspace.Message.Text = ""
killallplayers()
wait(5)
script.Parent.ClickDetector.MaxActivationDistance=32

end)
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
31 Oct 2012 09:25 AM
Isn't that good that it works online?
Report Abuse
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
31 Oct 2012 09:27 AM
Sorry, works offline, not online
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
31 Oct 2012 09:34 AM
for i = 1,#playerlist do
Report Abuse
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
31 Oct 2012 09:38 AM
Nope.
Report Abuse
rashiel123 is not online. rashiel123
Joined: 27 May 2008
Total Posts: 56
31 Oct 2012 04:56 PM
In case you want to test it online.. Instead of clicking;

Tools > Test > Play Solo

Click;

Tools > Test > Start Server

Then wait for the server to start. Then, from the server, click;

Tools > Test > Start Player
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