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: I need some help with a War Round script.

Previous Thread :: Next Thread 
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
08 Apr 2012 10:13 AM
I need help randomizing teams for a war game I am making, where I want to randomize the teams every time. I also need help giving a certain amount of money to the winners. Here is my plan.

local a = Instance.new("Message")
Message.Parent = game.Workspace
local b = game.Players.Value
local winners = game.Winners
function Round()
while true do
if game.Players.Value = 2 then
[randomizing thing here]
a.Text = "Teams have been randomized. Good luck!"
a:Remove()
wait(600)
winners.Value = [Most KOs]
[I need help recreating the message on this line]
a.Text = "Game time up"
wait(3)
a.Text = "Randomizing Teams..."
wait(3)
a.Remove
end
end

--[[Note: Anything in [] is something I need help with]]--
Report Abuse
Mecablox is not online. Mecablox
Joined: 16 Jul 2011
Total Posts: 433
08 Apr 2012 10:47 AM
Why delete the message? You can just do:

if game.Players.Value = 2 then
[randomizing thing here]
a.Text = "Teams have been randomized. Good luck!"
a.Text = ""
wait(600)
winners.Value = [Most KOs]
a.Text = "Game time up"
wait(3)
Report Abuse
Mecablox is not online. Mecablox
Joined: 16 Jul 2011
Total Posts: 433
08 Apr 2012 10:50 AM
I don't know if that works, never experimented with that before. Otherwise you can do:

if game.Players.Value = 2 then
[randomizing thing here]
a.Text = "Teams have been randomized. Good luck!"
a:Remove()
wait(600)
winners.Value = [Most KOs]
local a = Instance.new("Message")
a.Parent = game.Workspace
a.Text = "Game time up"
wait(3)
Report Abuse
chaokid9 is not online. chaokid9
Joined: 29 Aug 2008
Total Posts: 6187
08 Apr 2012 10:54 AM
In the second line,

local a = Instance.new("Message")
"Message.Parent = game.Workspace"

Shouldn't it be:
"a.Parent = game.Workspace"
Because the script does not know what "Message" is.
Report Abuse
Mecablox is not online. Mecablox
Joined: 16 Jul 2011
Total Posts: 433
08 Apr 2012 10:55 AM
I was thinking that.
Just didn't get to it yet.
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
09 Apr 2012 05:33 PM
Oops.
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