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: Please help

Previous Thread :: Next Thread 
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
17 Feb 2014 03:07 PM
The script works with no errors in offline mode and in online mode but with only 1 player. Once there is more than 1 player, I get an error on line 11 "It is not a valid member of Player" What this script does (or what it's supposed to do) is select a random player from all the players in the server and teleport all the players except for the randomly selected one. I think there is a problem with distinguishing who is the reaper(random player)

while true do
for i = 20, 0, -1 do
wait(1)
script.Parent.Text = i
end
pls = game.Players:players()
reaper = game.Players:players()[math.random(1, #pls)]
a = Instance.new("BoolValue", reaper)
a.Name = "It"
for i, v in pairs(game.Players:GetChildren()) do
if v.It == nil then
v.Character:MoveTo(Vector3.new(500, 5, 0))
elseif v.It ~= nil then
end
end
reaper.It:Remove()
script.Parent.Parent.Text1.Text = "Game in progress"
script.Parent.Parent.Text2.Text = "Game ending in:"

for i = 60, 0, -1 do
wait(1)
script.Parent.Text = i
end
for i, v in pairs(game.Players:GetChildren()) do
v.Character:MoveTo(Vector3.new(0, 5, 0))
end
script.Parent.Parent.Text1.Text = "No game in progress"
script.Parent.Parent.Text2.Text = "Time until next round:"
end
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
17 Feb 2014 03:29 PM
I know it's a bit advanced but can anybody help? :/
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
17 Feb 2014 03:31 PM
line 6, :players()

I guess that's wrong.
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
17 Feb 2014 03:33 PM
No its not
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
17 Feb 2014 03:33 PM
its the same as using GetPlayers
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
17 Feb 2014 03:34 PM
line 11,
if v:FindFirstChild("It") == nill then
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
17 Feb 2014 03:38 PM
btw, next time, write your own script, not just copy it.
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
17 Feb 2014 03:55 PM
error, i wrote this whole thing myself thank you very much and i fixed it myself so thanks but no thanks
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