ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 03:44 PM |
Part1 = Teleport Part2 = Here
local Pos1 = game.Workspace:FindFirstChild(Teleport,true) local Pos2 = game.Workspace:FindFirstChild(Here,true)
local db = false
Pos1.Touched:connect(function(hit) db = true if hit.Parent:FindFirstChild("Humanoid") ~= nil then hit.Parent.Torso.CFrame = CFrame.new(Pos2.Position+Vector3.new(0,5,0)) db = false end end)
I have a part called Teleport and Here, but this just wont work. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 03:46 PM |
"Part1=teleport" "Part2 = here"
You need to say where they are
Part1= Game.workspace.teleport |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 03:48 PM |
When you assign the Teleport and Here variable, you're not actually telling it that Part1 = your part called Teleport. Imagine I have a part called 'Part' and I want to assign it to the variable 'killBrick'. I'd do this:
killBrick = game.Workspace.Part
So, in your case, it might be:
Part1 = game.Workspace.Teleport Part2 = game.Workspace.Here |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Apr 2014 03:49 PM |
| I wrote it whilst you posted that. |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 03:50 PM |
Part1 = Game.workspace.teleport Part2 = Game.workspace.here
local Pos1 = game.Workspace:FindFirstChild(Part1,true) local Pos2 = game.Workspace:FindFirstChild(Part2,true)
local db = false
Pos1.Touched:connect(function(hit) db = true if hit.Parent:FindFirstChild("Humanoid") ~= nil then hit.Parent.Torso.CFrame = CFrame.new(Pos2.Position+Vector3.new(0,5,0)) db = false end end)
Still isn't working. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 03:51 PM |
Erm is the Teleport button capital or not capital?
Because the variable of part1 and part2 need to be exact name case sensitive |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 03:52 PM |
Also at the end you put end twice together Make them be on a new line |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
| |
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 03:53 PM |
Part1 = game.workspace.teleport Part2 = game.workspace.here
local Pos1 = game.Workspace:FindFirstChild(Part1,true) local Pos2 = game.Workspace:FindFirstChild(Part2,true)
local db = false
Pos1.Touched:connect(function(hit) db = true if hit.Parent:FindFirstChild("Humanoid") ~= nil then hit.Parent.Torso.CFrame = CFrame.new(Pos2.Position+Vector3.new(0,5,0)) db = false end end)
This isn't working either. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 03:58 PM |
Isn't it debounce
Local debounce = true
|
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 03:58 PM |
| Please help, I only need this one script for my game right now. |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 04:01 PM |
Part1 = game.workspace.teleport Part2 = game.workspace.here
local Pos1 = game.Workspace:FindFirstChild(Part1,true) local Pos2 = game.Workspace:FindFirstChild(Part2,true)
local debounce = false
Pos1.Touched:connect(function(hit) debounce = true if hit.Parent:FindFirstChild("Humanoid") ~= nil then hit.Parent.Torso.CFrame = CFrame.new(Pos2.Position+Vector3.new(0,5,0)) debounce = false end end)
Still isn't working.. waiiiiiiiiii |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 04:04 PM |
| Capitalise the w in game.Workspace |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 04:08 PM |
Part1 = game.Workspace.teleport Part2 = game.Workspace.here
local Pos1 = game.Workspace:FindFirstChild(Part1,true) local Pos2 = game.Workspace:FindFirstChild(Part2,true)
local debounce = false
Pos1.Touched:connect(function(hit) debounce = true if hit.Parent:FindFirstChild("Humanoid") ~= nil then hit.Parent.Torso.CFrame = CFrame.new(Pos2.Position+Vector3.new(0,5,0)) debounce = false end end)
Okay, lets go to basic things.
I have it in the Workspace, and I have 2 parts named teleport and here.
Why doesn't it work!? |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 04:14 PM |
| Have you just given up one me? D: |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 13 Apr 2014 04:17 PM |
| Learn what FindFirstChild actually does... |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 04:19 PM |
I didn't write this script, someone else did for me.
Can you just re-write it so it works, please? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 13 Apr 2014 04:24 PM |
local Part1 = workspace.teleport --make sure these actually exist local Part2 = workspace.here local Pos1 = Part1.Position local Pos2 = Part2.Position
local db = false
Pos1.Touched:connect(function(hit) if db then return end if hit.Parent:FindFirstChild("Torso") then db = true hit.Parent.Torso.CFrame = CFrame.new(Pos2+Vector3.new(0,5,0)) wait(1) db = false end end) |
|
|
| Report Abuse |
|
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 04:28 PM |
Still isn't working.
What I am trying to achive is step on one block and you teleport to another set block.
I have teleport and here in the workspace, as long as the script in the workspace.
The place is here -
http://web.roblox.com/Slides-Alpha-v0-1-place?id=152067264 |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
ieyedude
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 5059 |
|
|
| 13 Apr 2014 04:39 PM |
Still not working. I DONT KNOW WHY.
Is there anyway you can just make a script from scratch, that when a certain brick is touched, it is teleported to another set brick? |
|
|
| Report Abuse |
|
|