|
| 11 Mar 2014 03:25 PM |
when they join,if theres lets say:8 players online,then it teleports them to another place with same template like:
Universe -World1 -World2 -World3
and then:
game.Players.PlayerAdded:connect(function(p) if game.Players.NumPlayers == 8 then --teleport the player to world1 else --ignore end) how would I do this? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Mar 2014 03:51 PM |
That's exactly how you'd do that. Except you actually need to use TeleportService, lol.
char = p.Character game:GetService ('TeleportService'):Teleport (126157895, char) -- advertising, lol |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 03:52 PM |
btw how would I get several places in a universe? all with same template,and not using createplace/saveplace..
so like :
Universe -World1 -World2 -World3 |
|
|
| Report Abuse |
|
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Mar 2014 03:59 PM |
Well, you can stop advertising my game like in the last example, and use the correct ID.
I can see a little better now, and I'd use a table:
worlds = {123456789,987654321,13379001}
then you couldn't use a .PlayerAdded method. At least it wouldn't make much sense. So replace it with a while wait () do loop and down in the if statement, put:
if game.Players.NumPlayers == 8 then for i,v in pairs (game.Players:GetPlayers ()) do char = v.Character game:GetService ('TeleportService'):Teleport (worlds[i], char)
|
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:52 PM |
Well,ik how I would do it lol..(I saw your example from b4) But I mean HOW do I put a place,INTO another place? (WITHOUT CREATEPLACE/SAVEPLACE)
And the .PlayerAdded script makes 100% sence,here's how it works:
Universe-this is World0,so the place people will join at -World1-this is World1,so when World0 is full,they will go to World1 -World2-if World2 is full,they will come here Etc Etc
And then by World..erm idk 8?
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) if game.Players.NumPlayers == 8 then --btw,probly gonna change this p.PlayerGui:ClearAllChildren() game.Lighting.GameIsFullGui:clone().Parent = p.PlayerGui wait(1) p:destroy() end end) end)
Do you get the idea? In Universe,there will be something at top of screen that says:World0 In World1,it'll say World1 World2 says World2 Etc
But my REAL question NOW is how do I put World1,World2,etc INTO Universe??? |
|
|
| Report Abuse |
|
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
|
| 11 Mar 2014 04:59 PM |
| I really don't know much about universes sorry :/ |
|
|
| Report Abuse |
|
|