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: Round System Script help needed!

Previous Thread :: Next Thread 
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 02:45 PM
Help... I'm creating a War game and i don't know how to make a Round system. (I'm a Beginner at SCRIPTING so i know How to make killing bricks, Falling bricks and else, But not at Save and like Higher stuff)
So... How is it possible to make my round last 4.50 minutes? Ik that you must use
wait (4.50)



Now here's the problem. I wanna make my round end, But i don't know how, Maybe like this?

function if true do
wait (40)
Workspace.(Now here's the problem. Is it boolean? or nil, something like this or string).Humanoid.Health = 0
print "New game will start in 15 seconds"
wait (1)
print "New game will start in 14 seconds"
wait (1)
print "New game will start in 13 seconds"
wait (1)
print "New game will start in 12 seconds"
wait (1)
print "New game will start in 11 seconds"
wait (1)
print "New game will start in 10 seconds"

and so on...
So? is it right or not, Just Answer me how to make everyone kill without typing everyone's NAME on roblox in.
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 02:49 PM
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil then
if v.Character.Humanoid ~= then
v.Character.Humanoid.Health = 0
end
end
end
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 02:50 PM
Is end really needed that much over there?
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 02:52 PM
Yes, so it can end each function.
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 02:52 PM
Now i haz an another problem, I don't know how to teleport people to the area i wan't do. Like Team 1 goes to there and Team 2 Goes somewhere else. Could i just use Teleporter pads?
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 02:54 PM
Atleast someone knows how to help, Thank you!!! Maybe I will become a better scripter in future :)
Report Abuse
awesomeM3 is not online. awesomeM3
Joined: 23 Aug 2011
Total Posts: 1992
01 Dec 2012 02:55 PM
i suggest you use screen gui?
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 02:58 PM
for i,v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == game.Teams.Team1.TeamColor then
v.Character:MoveTo(position)
elseif v.TeamColor == game.Teams.Team2.TeamColor then
v.Character:MoveTo(position2)
end
end
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 02:58 PM
Not that good idea... People might not Notice it, I'll leave ScreenGui to beginning of the game. If you join.
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:00 PM
Okay??? I'm not getting it. How can i set position to it?
Report Abuse
spynaz is not online. spynaz
Joined: 17 Feb 2011
Total Posts: 1326
01 Dec 2012 03:02 PM
Well maybe instead of killing the players you could teleport them by doing this:

for i,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil then
if v.TeamColor == "Bright red" then --Team 1 color
v.Character.Torso.Position = Vector3.new(0, 0, 0) --Position Team 1 teleports to
elseif v.TeamColor == "Bright green" then --Team 2 color
v.Character.Torso.Position = Vector3.new(0, 0, 0) --Position Team 2 teleports to
end
end
end
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 03:02 PM
Like if you add a brick and name it Team1 and put it where you want Team1 to spawn then you can use MoveTo(game.Workspace.Team1.Position) and then the same thing for Team2 but with a different brick and name.
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:03 PM
I'll use a SpawnLocation to mark where they teleport?
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:04 PM
@dnic thanks... That got it in my mind Saved in my "Brain DISK"
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 03:04 PM
Yeah, you can use that but rename the SpawnLocations so it can pick up the exact spawn to spawn at..
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:07 PM
Problem Nr.3, I need to erase maps after the round and Randomize Maps what comes and else.
My script right now:

function if true do
wait (40)
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil then
if v.Character.Humanoid ~= then
v.Character.Humanoid.Health = 0
end
end
end

print "New game will start in 15 seconds"
wait (1)
print "New game will start in 14 seconds"
wait (1)
print "New game will start in 13 seconds"
wait (1)
print "New game will start in 12 seconds"
wait (1)
print "New game will start in 11 seconds"
wait (1)
print "New game will start in 10 seconds"
wait (1)
print "New game will start in 9 seconds"
wait (1)
print "New game will start in 8 seconds"
wait (1)
print "New game will start in 7 seconds"
wait (1)
print "New game will start in 6 seconds"
wait (1)
print "New game will start in 5 seconds"
wait (1)
print "New game will start in 4 seconds"
wait (1)
print "New game will start in 3 seconds"
wait (1)
print "New game will start in 2 seconds"
wait (1)
print "New game will start in 1 second"
wait (1)
print "Preparing up your Positions."
wait (1)
print "Preparing up your Positions.."
wait (1)
print "preparing up your Positions..."

for i,v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == game.Teams.Team1.TeamColor then
v.Character:MoveTo(position)
elseif v.TeamColor == game.Teams.Team2.TeamColor then
v.Character:MoveTo(position2)
end
end
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:09 PM
Should that script need 2 players thing that 2 players must be in? Lua would make some more sense if it would be Plain ENGLISH.
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:13 PM
I'll suggest I'll use a free model REGEN script Then rescript it.
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 03:14 PM
Well, your function is corrupted. You should use something like this,
function reset()
---bla
---bla
---bla
end

And when you need the game to reset inside of your script you use.
reset()
Report Abuse
spynaz is not online. spynaz
Joined: 17 Feb 2011
Total Posts: 1326
01 Dec 2012 03:17 PM
I have reduced your script more professional:

function if true do
wait (40)
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil then
if v.Character.Humanoid ~= then
v.Character.Humanoid.Health = 0
end
end
end

for i = 15, 1, -1 do
print ("New game will start in "..i.." seconds")
wait (1)
end

print ("Preparing up your Positions.")
wait (1)
print ("Preparing up your Positions..")
wait (1)
print ("preparing up your Positions...")

for i,v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == game.Teams.Team1.TeamColor then
v.Character:MoveTo(position)
elseif v.TeamColor == game.Teams.Team2.TeamColor then
v.Character:MoveTo(position2)
end
end
Report Abuse
spynaz is not online. spynaz
Joined: 17 Feb 2011
Total Posts: 1326
01 Dec 2012 03:18 PM
Opps I stated the the wrong way. XD

I have reduced your script.*
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:19 PM
Okay... That is solved, But here's still a problem, How can I make a map Disappear after round ends? And when the map is repicked it regens.
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:20 PM
Thanks for reduce. I hated that Blah blah blah anyway.
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
01 Dec 2012 03:24 PM
Parent your maps inside of the lighting. Then when the round starts clone it from the lighting into the workspace by:

local map = game.Lighting["Map's Name"]:Clone()
map.Name = "Map"
map.Parent = game.Workspace

And then when the round is over, remove the map by:

local map = game.Workspace:findFirstChild("Map")
if map then
map:remove()
end
Report Abuse
madiik is not online. madiik
Joined: 10 Feb 2009
Total Posts: 625
01 Dec 2012 03:32 PM
How can i randomize the Map Selection?
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