|
| 29 Oct 2011 09:46 AM |
It just won't teleport the guy. Output says nothing.
script.Parent.Touched:connect(function(p) local h = p.Parent:FindFirstChild("Huminoid") if h ~= nil then local plr = game.Players:FindFirstChild(p.Parent.Name) local torso = plr.Character.Torso local location = {script.Parent.Parent.Tele2.Position} local i = 1 local x = location[i].x local y = location[i].y local z = location[i].z x = x + math.random(-1, 1) z = z + math.random(-1, 1) y = y + math.random(2, 3) local lx = 0 local ly = y local lz = 0 torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) end end) |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 29 Oct 2011 09:50 AM |
local h = p.Parent:FindFirstChild("Huminoid") to local h = p.Parent:FindFirstChild("Humanoid")
Also, I would add a debounce to prevent breaking. |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2011 09:55 AM |
| Aha! Thanks, I hate spelling errors. Anyway, I just now added a debounce, too. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
| |
|