|
| 15 Jan 2016 09:18 AM |
https://gyazo.com/404f01368a74dd3faea3df34af1939af
script:
------------------------------------ modelname="tele2" ------------------------------------
function onTouched(part) if part.Parent ~= nil then local h = part.Parent:findFirstChild("Humanoid") if h~=nil then local teleportfrom=script.Parent.Enabled.Value if teleportfrom~=0 then if h==humanoid then return end local teleportto=script.Parent.Parent:findFirstChild(modelname) if teleportto~=nil then local torso = h.Parent.Torso local location = {teleportto.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 cf = torso.CFrame local lx = 0 local ly = y local lz = 0 script.Parent.Enabled.Value=0 teleportto.Enabled.Value=0 torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) wait(.5) script.Parent.Enabled.Value=1 teleportto.Enabled.Value=1 wait (1) game.Workspace.Background:Stop() game.Workspace.Alert:Stop() game.Workspace.Model.Lava.raise.Disabled = true game.Workspace.Model.Lava.BodyVelocity.Velocity = Vector3.new(0,0,0) wait (1) game.Workspace.Model.Lava.Position.Y = 34
else print("Could not find teleporter!") end end end end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 15 Jan 2016 09:36 AM |
game.Workspace.Model.Lava.Position.Y = 34
Should be
LavaCF = game.Workspace.Model.Lava.CFrame
LavaCF = CFrame.new(LavaCF.X, 34, LavaCF.Z) |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2016 09:42 AM |
| part called Lava doesn't have any CFrame in it. |
|
|
| Report Abuse |
|
|
| |
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 15 Jan 2016 09:56 AM |
| Cframe is a property of a part. Coordinate frame, for positioning. |
|
|
| Report Abuse |
|
|
AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
|
| 15 Jan 2016 10:47 AM |
'part called Lava doesn't have any CFrame in it.'
Rather than replying with an inept and incoherent response, actually try code given to you by clearly superior individuals. At least try it before going on about something you seem to barley seem to understand.
-____________________________- |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2016 10:57 AM |
| Found it out and fixed it out by myself, thanks for trying. |
|
|
| Report Abuse |
|
|