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: Map Changer Script Help? (:

Previous Thread :: Next Thread 
ReilaChan is not online. ReilaChan
Joined: 17 Feb 2012
Total Posts: 25
23 Feb 2012 11:50 PM
So I have this map changing script because I want to have a lobby and when the game starts, have the players spawn onto the map, but this script won't seem to work, maybe someone can notice if anything is broken or so, and I put the game in the lighting with the exact name, so I'm not sure if it's just something I am doing that's wrong. I am a newbie to this stuff. :P

Thanks in advance for any advice or help given.

while true do --This makes sure it keeps going and doesn't die out on us
wait(5) --This is how long until the games are started. Recomended that you keep to 5
local m = math.random(1,1) --This randomly selects a game. The second number shows how many games there are
local player = game.Players:GetPlayers()
for i = 1, #player do --This checks for players and gets them
msg = Instance.new("Message") --This make the annoying messages that appear on you screen
msg.Parent = nil --This identifies the game
if m == 1 then --don't change unless you know what you are doing
msg.Parent = game.Workspace --This makes sure it says and appears in the workspace
msg.Text = "Map Choosing" --A bunch of messages to tell you that the game is starting which you can change if desired
wait(1)
msg.Text = "Choosing Map.."
wait(2)
msg.Text = "A Map Has been Selected!"
wait(3)
msg.Text = "The Map is"
wait(3)
msg.Text = "Name of Minigame" --Put the name of the minigame you want it to be called
wait(2)
msg.Text = "Survive The Longest and be the Winner" --Put the rules of the minigame
wait(5)
msg.Text = "The game will be starting in:"
wait(1)
msg.Text = "...3..."
wait(1)
msg.Text = "..2.."
wait(1)
msg.Text = ".1."
wait(1)
msg.Text = "Begin!"
wait(1)
player[i].Character:MoveTo(Vector3.new(0,2,2)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame
msg:remove() --This removes the annoying messages Don't mess with!
game.Lighting.Minigame1:clone().Parent = game.Workspace -- Make a minigame then name it just like this: Minigame1 Once it is named that, put it in the position on the map were you want it to go then put the model in lighting. After you put the model in lighting, you may delete the one in workspace if you wish.
wait(300) --How long the game lasts
msg.Parent = game.Workspace
msg.Text = "Winner(s)!" --After the game ends, this shows a message/messages at the end. Edit if you want.
wait(3)
msg:remove()
game.Workspace.Minigame1:Remove() --Removes the brick so all players die (except spectators) and removes the brick so a new game can start (recommended games aren't over 5 minutes so spectators aren't bored)
end
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Feb 2012 06:08 AM
output?
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
24 Feb 2012 07:17 AM
That's a terrible script, and it's free models...
Report Abuse
Sam3812 is not online. Sam3812
Joined: 23 Nov 2007
Total Posts: 1703
24 Feb 2012 07:54 AM
It's a horribly written script, that's true, at least the OP posted properly and didn't request it.

while true do --This makes sure it keeps going and doesn't die out on us
wait(5) --This is how long until the games are started. Recomended that you keep to 5
local m = math.random(1,1) --This randomly selects a game. The second number shows how many games there are
local player = game.Players:GetPlayers()
for i = 1, #player do --This checks for players and gets them
msg = Instance.new("Message") --This make the annoying messages that appear on you screen
msg.Parent = nil --This identifies the game
if m == 1 then --don't change unless you know what you are doing
msg.Parent = game.Workspace --This makes sure it says and appears in the workspace
msg.Text = "Map Choosing" --A bunch of messages to tell you that the game is starting which you can change if desired
wait(1)
msg.Text = "Choosing Map.."
wait(2)
msg.Text = "A Map Has been Selected!"
wait(3)
msg.Text = "The Map is"
wait(3)
msg.Text = "Name of Minigame" --Put the name of the minigame you want it to be called
wait(2)
msg.Text = "Survive The Longest and be the Winner" --Put the rules of the minigame
wait(5)
msg.Text = "The game will be starting in:"
wait(1)
msg.Text = "...3..."
wait(1)
msg.Text = "..2.."
wait(1)
msg.Text = ".1."
wait(1)
msg.Text = "Begin!"
wait(1)
player[i].Character:MoveTo(Vector3.new(0,2,2)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame
msg:remove() --This removes the annoying messages Don't mess with!
game.Lighting.Minigame1:clone().Parent = game.Workspace -- Make a minigame then name it just like this: Minigame1 Once it is named that, put it in the position on the map were you want it to go then put the model in lighting. After you put the model in lighting, you may delete the one in workspace if you wish.
wait(300) --How long the game lasts
msg.Parent = game.Workspace
msg.Text = "Winner(s)!" --After the game ends, this shows a message/messages at the end. Edit if you want.
wait(3)
msg:remove()
game.Workspace.Minigame1:Remove() --Removes the brick so all players die (except spectators) and removes the brick so a new game can start (recommended games aren't over 5 minutes so spectators aren't bored)
end
end
end

the problem was that you were missing two ends, I've added them on, the above should work.
Report Abuse
ReilaChan is not online. ReilaChan
Joined: 17 Feb 2012
Total Posts: 25
25 Feb 2012 01:51 AM
Oh yeah o.o; Thank you so much for the help!

Yeah I did get this from a free models because I am just starting on scripting and actually these free models help quite a bit for me learning, I knew you had to end but I just didn't realize that the script was missing it, I looked everywhere but there. lol.

Thanks for the help! It works now. :D
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
25 Feb 2012 02:17 AM
Next time use Output. It helps a lot finding errors.
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