|
| 29 Sep 2014 05:46 PM |
So, my idea is that once the script runs, it will simultaniously teleport all Players to one of 7 places in my Game Universe. Developer Console doesn't give me output, and my script is not running. Please help, thanks.
local teleportService = game:GetService("TeleportService") wait(2) local player = game.Players:GetPlayerFromCharacter(character) if player then wait(1) while true do game:GetService("TeleportService"):Teleport(177775809, player) --1 game:GetService("TeleportService"):Teleport(177776170, player) --2 game:GetService("TeleportService"):Teleport(180205588, player) --3 game:GetService("TeleportService"):Teleport(180205791, player) --4 game:GetService("TeleportService"):Teleport(180205843, player) --5 game:GetService("TeleportService"):Teleport(180206136, player) --6 game:GetService("TeleportService"):Teleport(180206233, player) --7 end |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 05:54 PM |
My problem could have been around:
"local player = game.Players:GetPlayerFromCharacter(character)"
I'm not certain, though.
|
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 29 Sep 2014 05:57 PM |
all players? why are you only teleporting one player then?
local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233};
for i, v in pairs(game.Players:GetPlayers()) do game:GetService("TeleportService"):Teleport(places[math.random(#places)], v) end
if you want them all to go to the same place, however, use this instead
local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233};
local place = places[math.random(#places)];
for i, v in pairs(game.Players:GetPlayers()) do game:GetService("TeleportService"):Teleport(place, v) end |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 06:12 PM |
That looks a lot better, though I was kind of hoping for something that sends so many requests that it'd lag the user really badly and add a lot more places to their Recently Played Games
But I see the problem, it wasn't even something I included in this thread
My syntax started with "if game.Workspace.Hint.Text == "666" then" (there's a Hint that constantly changes, and in the end it changes the text to 666 and sends a mass request)
The problem is, it was only searching for the Hint's text only One time. So, by the time the hint changed to the spooky satanic number, it has alerady scanned for the text, concluded it Hint.Text is not equal to 666, and ignored the Teleport Request.
Time to change this and test it |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 06:20 PM |
Hmm, still not seeming to do what it should.
I'll run a few more tests, and if anyone replies with a suggestion to fix this, I'll check it
|
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 06:25 PM |
Tried to test out the old version with my attempted solution. So far, nothing
--code below
wait(20) --[[ local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233};
for i, v in pairs(game.Players:GetPlayers()) do game:GetService("TeleportService"):Teleport(places[math.random(#places)], v) end ]] local teleportService = game:GetService("TeleportService") --Allows for Teleport wait(2) local player = game.Players:GetPlayers() do if player then wait(1) while true do game:GetService("TeleportService"):Teleport(177775809, player) --1 game:GetService("TeleportService"):Teleport(177776170, player) --2 game:GetService("TeleportService"):Teleport(180205588, player) --3 game:GetService("TeleportService"):Teleport(180205791, player) --4 game:GetService("TeleportService"):Teleport(180205843, player) --5 game:GetService("TeleportService"):Teleport(180206136, player) --6 game:GetService("TeleportService"):Teleport(180206233, player) --7 end
|
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 06:33 PM |
It does not send a request to teleport, all I can gather so far
|
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 29 Sep 2014 06:33 PM |
wtf is this
wait(20)
local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233};
local teleportService = game:GetService("TeleportService") --Allows for Teleport wait(2) local player = game.Players:GetPlayers() wait(1) while wait() do for i, v in pairs(player) do game:GetService("TeleportService"):Teleport(places[i%7], v) end end
|
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 29 Sep 2014 06:34 PM |
noticed an error in last script, do this instead arent u an oter btw
wait(20)
local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233};
local teleportService = game:GetService("TeleportService") --Allows for Teleport wait(2) wait(1) while wait() do for i, v in pairs(game.Players:GetPlayers()) do game:GetService("TeleportService"):Teleport(places[i%7], v) end end |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 06:38 PM |
"noticed an error in last script, do this instead arent u an oter btw"
I am ColorfulBrendon. My main is not banned, I am simply working on a side-project.
"wtf is this
wait(20)
local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233};
local teleportService = game:GetService("TeleportService") --Allows for Teleport wait(2) local player = game.Players:GetPlayers() wait(1) while wait() do for i, v in pairs(player) do game:GetService("TeleportService"):Teleport(places[i%7], v) end end"
A variable "places" with a table with a list of place IDs, getting the teleport service, waiting 2 seconds, getting all players, waiting another second, trying to teleport them, etc
|
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 06:53 PM |
Thank you all so so so much.
I made a hybrid script out of all of yours combined, tried with both local and non-local scripts,
and it WORKED.
Thank you.
|
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 07:16 PM |
Problem
All places in the universe have the same script, and after multiple trials,
It will always send to 177775809 after the spawn map.
Right after that, when you are being teleported away from that map,
It gives ID=17 |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 29 Sep 2014 09:53 PM |
wait(20)
local places = {177775809, 177776170, 180205588, 180205791, 180205843, 180206136, 180206233}; local currentDetection = game.placeId local key; for i, v in pairs(places) do if v==currentDetection then key = i break end end key = key == #places and 1 or key+1 local teleportService = game:GetService("TeleportService") --Allows for Teleport wait(2) wait(1) while wait(7) do for i, v in pairs(game.Players:GetPlayers()) do game:GetService("TeleportService"):Teleport(places[key], v) end end |
|
|
| Report Abuse |
|
|