|
| 21 Jan 2013 12:11 PM |
I lost track of my other Thread, so I'm making a new one.
local Tel1 = script.Parent local Tel2 = script.Parent.Parent.T2
function onTouch(Brick)
local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then Player.Parent.Torso.CFrame = Cframe.new(Tel2.Position+Vector3.new(0,3,0) end end
Tel1.Touched:connect(onTouch)
Output says nothing is wrong, yet I do not teleport. And if you see another thread made by me with the EXACT question, can you send me the link? |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 21 Jan 2013 12:18 PM |
local Tel1 = script.Parent local Tel2 = script.Parent.Parent.T2
function onTouch(Brick)
local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then Player.Parent.Torso.CFrame = Cframe.new(Tel2.Position.X,Tel2.Position.Y + 3,Tel2.Position.Z) end end
Tel1.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
megaguy44
|
  |
| Joined: 28 Sep 2008 |
| Total Posts: 1066 |
|
|
| 21 Jan 2013 12:19 PM |
*cough* http://www.roblox.com/Forum/ShowPost.aspx?PostID=87485501 *cough*
print('Hello World!') |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2013 12:26 PM |
| OK thanks. Now I gotta pick which one to use. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2013 12:29 PM |
| Oh, and how do I add a debounce to this..... |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
|
| 21 Jan 2013 12:31 PM |
local Tel1 = script.Parent local Tel2 = script.Parent.Parent.T2 debounce = false function onTouch(Brick) wait() if debounce == true then return end wait() debounce = true local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil) then Player.Parent.Torso.CFrame = Cframe.new(Tel2.Position.X,Tel2.Position.Y + 3,Tel2.Position.Z) debounce = false end end
Tel1.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2013 12:32 PM |
| Nvm I'll just think about some creative way without using debounce. |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jan 2013 12:36 PM |
| Now I can modify this for my need, thanks. |
|
|
| Report Abuse |
|
|