|
| 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 |
|
|
| 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 |
|