RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 27 Dec 2013 05:39 AM |
Okay so I have these two scripts:
rannum = math.random(1,3) --generate a random map(roblox is terrible at random numbers) game.Lighting:FindFirstChild("Map"..rannum)Parent = game.Workspace
if rannum == 1 then --map positions mapvector3 = Vector3.new(-358.3, -70.8, -560.9) elseif rannum == 2 then mapvector3 = Vector3.new(223.9, 87.8, -558.5) elseif rannum == 3 then mapvector3 = Vector3.new(24.992, 91.039, -200.813) end
gp = game.Players:children() --teleport the players without getting them stuck for num = 1, #gp do gp[num].Torso.CFrame = mapvector3 + Vector3.new(math.random(-15, 15)/15), 0, math.random(-15, 15)/15)) end
--That would put the map in the workspace and teleport all characters very close to that point.
(It puts a red line in the script under this line, is this a right line??) gp[num].Torso.CFrame = mapvector3 + Vector3.new(math.random(-15, 15)/15), 0, math.random(-15, 15)/15))
And
-- Make 3 models, name the first one Map1, name the second one Map2, name the third one Map3. --In order, Put Map1 in Lighting, then Map2 in Lighting, then Map3 in Lighting.
while true do --This keeps the script running, if you delete this it, the script will get stuck at Map3 and will not go back to Map1. game.Lighting.Map1:clone().Parent = game.Workspace wait(120) --The time the game lasts in seconds. ( Set at 60 seconds / One minute. You can change this. ) local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = ("Loading Desert City by AwesomeRobloxMarc") -- The name of the Map goes here. ( You can change it to a custom name like for a sword game : Sword fights on the noob! ) wait(2) msg:remove() game.Workspace.Map1:remove() wait(30) --Time you have before the next game begins. ( You can change this. )
game.Lighting.Map2:clone().Parent = game.Workspace wait(100) --The time the game lasts in seconds. ( Set at 60 seconds / One minute. You can change this. ) msg.Parent = game.Workspace msg.Text = ("Loading Racing Circuit by RealistK") -- The name of the Map goes here. ( You can change it to a custom name like for a sword game : Sword fights on the noob! ) wait(2) msg:remove() game.Workspace.Map2:remove() wait(30) --Time you have before the next game begins. ( You can change this. )
game.Lighting.Map3:clone().Parent = game.Workspace wait(100) --The time the game lasts in seconds. ( Set at 60 seconds / One minute. You can change this. ) msg.Parent = game.Workspace msg.Text = ("Loading Nuketown by RobloEagle") -- The name of the Map goes here. ( You can change it to a custom name like for a sword game : Sword fights on the noob! ) wait(2) msg:remove() game.Workspace.Map3:remove() wait(30) --Time you have before the next game begins. ( You can change this. )
end
Now my question is, do I need both of these scripts?
And my other one is, it doesn't teleport the players with both of the scripts, do I need to remove one or is it just a mistake in the first script?
And yet my last question: when I start a server, it automatically shows the first map underneath the lobby (the place where it belongs) but then it gives this message of loading desert city, but that is my first map, and it shows the second. Then at the third map it says Loading Racing Circuit but that is my second map... How do I prevent this and just make it right? |
|
|
| Report Abuse |
|
mer5000
|
  |
| Joined: 13 Aug 2012 |
| Total Posts: 2094 |
|
|
| 27 Dec 2013 05:42 AM |
Its obvious you didn't make this script.. making this post almost void.. |
|
|
| Report Abuse |
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 27 Dec 2013 06:03 AM |
| What does it matter if I made it? |
|
|
| Report Abuse |
|
|
| 27 Dec 2013 06:04 AM |
@person above is an idiot. It's not "obvious". It's only obvious when it has "Script made by (insert user here)" at the bottom.
And no, even if this wasn't his script, it doesn't make it void. We can easily still find the problem and fix it.
Don't listen to him, someone will know what's wrong. |
|
|
| Report Abuse |
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 27 Dec 2013 06:06 AM |
| Thanks but I think you mean 2 places above ;p |
|
|
| Report Abuse |
|