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: Place all?

Previous Thread :: Next Thread 
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
29 Nov 2013 06:13 PM
local PlaceID = script.Parent.PlaceID
local Button = script.Parent.Button
local TeleService = game:GetService("TeleportService")
local PlaceIDText = ""
local players = game.Players:children()
-------------------------------------------------------
function onFocusLost()
PlaceIDText = PlaceID.Text
end

function onButtonClicked()
if tonumber(PlaceIDText) then
TeleService:Teleport.players(tonumber(PlaceIDText))
end
end

PlaceID.FocusLost:connect(onFocusLost)
Button.MouseButton1Click:connect(onButtonClicked)



I know that is horribly wrong, but I rarely use teleport service. Any help?
Report Abuse
LV1Z is not online. LV1Z
Joined: 23 Jul 2011
Total Posts: 652
29 Nov 2013 07:21 PM
game:getService("TeleportService"):Teleport(PLACEID,PLAYER'S CHARACTER)
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
29 Nov 2013 09:11 PM
Replaced it with that. Didn't work. Changed it to this, didn't work either. I want it to teleport everyone in-game.

local PlaceID = script.Parent.PlaceID
local Button = script.Parent.Button
local TeleService = game:GetService("TeleportService")
local PlaceIDText = ""
all = game.Players:GetChildren()
-------------------------------------------------------
function onFocusLost()
PlaceIDText = PlaceID.Text
end

function onButtonClicked()
if tonumber(PlaceIDText) then
game:getService("TeleportService"):Teleport(PlaceIDText,all)
end
end

PlaceID.FocusLost:connect(onFocusLost)
Button.MouseButton1Click:connect(onButtonClicked)
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
29 Nov 2013 09:12 PM
"Didn't Work"

How did it not work? Do you have any output?
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
29 Nov 2013 09:15 PM
The teleport service did not activate. No errors in output. Here is the model of the GUI.

http://www.roblox.com/Fix-this-item?id=137060292
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
30 Nov 2013 02:06 PM
Bump
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
30 Nov 2013 03:14 PM
Bump
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