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 » Game Design
Home Search
 

simple question on teleports

Previous Thread :: Next Thread 
chewysweetartz is not online. chewysweetartz
Joined: 29 Sep 2014
Total Posts: 1
11 Feb 2015 01:25 PM
I have two teleports (A,B) and two teleport destinations (1,2). I want A to go to 1 and B to 2, but both A and B go to 1, how do you do it so A goes to 1 and B goes to 2?

a link to a tutorial or another forum that answers this question would be great thanks
Report Abuse
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
11 Feb 2015 01:31 PM
If they're all in the same model then

tpone = script.Parent["1"]
tptwo = script.Parent["2"]

local t = script.Parent:GetChildren()
for i=1,#t do
if t[i]:IsA("BasePart") then
t[i].Touched:connect(function(hit)
if hit.Parent:findFirstChild("Torso") then
torso = hit.Parent.Torso
if t[i].Name == "A" then
torso.CFrame = CFrame.new(tpone.Position)
elseif t[i].Name == "B" then
torso.CFrame = CFrame.new(tptwo.Position)
end
end)
end
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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