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: Why Won't This Work?

Previous Thread :: Next Thread 
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 07:56 AM
wait(6)

while true do
h = Instance.new ("Message")
p = game.Players:GetChildren()
randplayer = p[math.random(#p)] --Chooses the random controller
randplayer.TeamColor = BrickColor.new("Bright blue")
randplayer.Character:BreakJoints()
m = Instance.new("Hint")
m.Parent = workspace
m.Text = randplayer.Name.." is the controller! "
wait(3)
m.Text = randplayer.Name.." Enjoy The Round! Time Left = 5 Minutes "
wait(3)
m.Parent = nil
h.Parent = workspace
h.Text = "Game Sponsored By The Vox Empire."
wait (5)
h.Parent = nil
hm = randplayer.Character.Humanoid
hm.MaxHealth=300 --Chooses their max health
hm.Health=300 --Chooses their current health
wait(300) --This is where you change the leangth of the game
for i = 1,#p do
if p[i].TeamColor == BrickColor.new("Bright red") then
p[i].TeamColor = BrickColor.new("Bright blue")
end
end
h.Parent = workspace
h.Text = "End of game"
wait(4)
h.Text = "Get ready for the next game"
wait (4)
h.Parent = nil

end






I have no idea why.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Aug 2012 07:58 AM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=9772680
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 07:58 AM
Nothing is happening at all...

(╯°□°)╯︵ sʇuɐdɹǝǝd
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Aug 2012 07:59 AM
Any output? Add prints? http://wiki.roblox.com/index.php/Debugging
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 08:04 AM
It's not letting me post the outputs, i'm getting errors

(╯°□°)╯︵ sʇuɐdɹǝǝd
Report Abuse
ipadboy123 is not online. ipadboy123
Joined: 05 Apr 2010
Total Posts: 6475
17 Aug 2012 08:05 AM
Is the Wait(5) correct you gotta wait five mins remember per round for your game.

mypart.Parent = Post.Parent.Parent.Parent.ipadboy123.PostCount
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 08:09 AM
So Wait(6) would make it wait 6 minutes?
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Aug 2012 08:09 AM
No. 6 seconds.
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 08:10 AM
So what does ipadboy123 mean?
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Aug 2012 08:10 AM
No idea!
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 08:16 AM
The output is

Workspace.Game Script:6: bad argument #1 to 'random' (interval is empty)
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Aug 2012 08:17 AM
randplayer = p[math.random(1, #p)]
?
Report Abuse
ipadboy123 is not online. ipadboy123
Joined: 05 Apr 2010
Total Posts: 6475
17 Aug 2012 08:19 AM
Peer i mean that your just counting secs not mins try to figure it to wait for mins not secs may help.
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 08:21 AM
Ugh, now I have


Workspace.Game Script:6: bad argument #2 to 'random' (interval is empty)


(╯°□°)╯︵ sʇuɐdɹǝǝd
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
17 Aug 2012 08:22 AM
That means #game.Players:GetChildren() = 0 - are there any players in the game?
Report Abuse
PeerPants is not online. PeerPants
Joined: 09 Nov 2007
Total Posts: 7393
17 Aug 2012 08:24 AM
I had me and someone else when I just tested it, nothing happened.

(╯°□°)╯︵ sʇuɐdɹǝǝd
Report Abuse
julienmauriemort is not online. julienmauriemort
Joined: 09 May 2009
Total Posts: 21560
17 Aug 2012 09:32 AM
Hmm, thats weird.

logic.dll has caused a page fault in brain.exe at 34B80FC [ Terminate ] [ Debug ]
Report Abuse
FearMeIAmLag is not online. FearMeIAmLag
Joined: 02 Jun 2012
Total Posts: 1748
17 Aug 2012 09:37 AM
try this as the beginning of the script...


while true do
wait(6)
Your script here...



this may help
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
17 Aug 2012 09:39 AM
You put math.random(#p)... It should be math.random(1, #p)
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2012 10:40 AM
Because a vox noob like u made it.U once accused me of exploiting when the baseplate we wore standing on was gone, and it was autowin, AND U BANNISHED ME from the place
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Aug 2012 11:06 AM
Because a vox noob like u made it.U once accused me of exploiting when the baseplate we wore standing on was gone, and it was autowin, AND U BANNISHED ME from the place
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Aug 2012 11:08 AM
Silly 18, you can do both!

† KMXD †
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
17 Aug 2012 11:11 AM
Have you tried using a for loop?
Like so?

for i = 1,#p do
e = math.random(p[i])
e.TeamColor = BrickColor.new("") -- Put team color here... :D
wait()
e:LoadCharacter()
end
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