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
 

Why won't this teleporter script work?

Previous Thread :: Next Thread 
darkUdog is not online. darkUdog
Joined: 01 Jul 2007
Total Posts: 27082
29 Jul 2011 12:56 PM
local place = script:FindFirstChild("30347671")
local spawn = script:FindFirstChild("32778076")

local placeId
local spawnName
if place then
placeId = place.Value
if spawn and spawn.Value then
spawnName = spawn.Value
game:GetService("TeleportService"):TeleportToSpawnByName(placeId, spawnName)
else
game:GetService("TeleportService"):Teleport(placeId)
end
end
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
29 Jul 2011 01:04 PM
Is the placeId in the value property as well as the name property?
Report Abuse
5943539 is not online. 5943539
Joined: 05 Jan 2010
Total Posts: 810
29 Jul 2011 01:07 PM
Just make it placeID=tonumber(place.Name). Actually make there be no spawn value.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
29 Jul 2011 01:10 PM
@594539 - Hmm, I didn't know you could do tonumber(place.Name)...
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
29 Jul 2011 01:14 PM
local place = script:FindFirstChild("30347671")
local spawn = script:FindFirstChild("32778076")

local placeId
local spawnName
if place then
placeId = place.Value
if spawn and spawn.Value then
spawnName = spawn.Value
game:GetService("TeleportService"):TeleportToSpawnByName(placeId)
else
game:GetService("TeleportService"):Teleport(placeId) --Same place?
end
end
Report Abuse
darkUdog is not online. darkUdog
Joined: 01 Jul 2007
Total Posts: 27082
29 Jul 2011 01:22 PM
I have no idea how to script at all ._.

I'll pay 100 R$ for a working teleporter model :(
Report Abuse
darkUdog is not online. darkUdog
Joined: 01 Jul 2007
Total Posts: 27082
29 Jul 2011 02:13 PM
Someone please help.
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