Dunker11
|
  |
| Joined: 16 May 2009 |
| Total Posts: 3070 |
|
|
| 26 Jan 2014 02:12 PM |
I have 2 teleporters and as soon as I step on one, it's super fast and teleports back within miliseconds. I want it to give me time to step off of it but it goes right away. What do I do to give myself time here?
TELEPORTER 1:
Ting = 0 script.Parent.Touched:connect(function(p) if p.Parent:findFirstChild("Torso") and Ting == 0 then Ting = 0 p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0) Ting = 0 end end)
TELEPORTER 2:
Ting = 0 script.Parent.Touched:connect(function(p) if p.Parent:findFirstChild("Torso") and Ting == 0 then Ting = 0 p.Parent.Torso.CFrame = script.Parent.Parent["1"].CFrame + Vector3.new(0,5,0) Ting = 0 end end) |
|
|
| Report Abuse |
|
|
Korrium
|
  |
| Joined: 25 Aug 2009 |
| Total Posts: 729 |
|
|
| 26 Jan 2014 02:22 PM |
maybe you should add wait(2)
I didn't read the script fully so you figure out where to put it. |
|
|
| Report Abuse |
|
|
Dunker11
|
  |
| Joined: 16 May 2009 |
| Total Posts: 3070 |
|
|
| 26 Jan 2014 02:27 PM |
| I already tried it in a few places it didn't help |
|
|
| Report Abuse |
|
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 26 Jan 2014 02:40 PM |
On each of them, have it when it's stepped, the other script gets disabled.
TELEPORTER 1:
Ting = 0 script.Parent.Touched:connect(function(p) if p.Parent:findFirstChild("Torso") and Ting == 0 then Ting = 0 script.Parent.Parent["2"].Script.Disabled = true --OVER HERE p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0) Ting = 0 end end)
TELEPORTER 2:
Ting = 0 script.Parent.Touched:connect(function(p) if p.Parent:findFirstChild("Torso") and Ting == 0 then Ting = 0 script.Parent.Parent["1"].Script.Disabled = true p.Parent.Torso.CFrame = script.Parent.Parent["1"].CFrame + Vector3.new(0,5,0) Ting = 0 end end)
~Hope I helped, if you need a script, PM me. ~Glory to CAT!~ ~CAT General Shawnyg~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 06:47 PM |
This is one of the first scripts i learned and at my place, i am using the same pair of teleporter since 2011. One of my friend had this problem and i fixed by adding Workspace.Touch.("Torso") I hope it works, or pm me, i'll try to help.
|
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:45 PM |
TELEPORTER 1:
Ting = 1 script.Parent.Touched:connect(function(p) wait(5) Ting = 0 end) script.Parent.Touched:connect(function(p) if p.Parent:findFirstChild("Torso") and Ting == 0 then Ting = 0 p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0) end Ting = 1 end)
TELEPORTER 2:
Ting = 1 script.Parent.Touched:connect(function(p) wait(5) Ting = 0 end) script.Parent.Touched:connect(function(p) if p.Parent:findFirstChild("Torso") and Ting == 0 then Ting = 0 p.Parent.Torso.CFrame = script.Parent.Parent["2"].CFrame + Vector3.new(0,5,0) end Ting = 1 end)
--There problem solved... Although, I'd check for errors incase I messed up. |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:47 PM |
"Workspace.Touch.("Torso")"
What is that nonsense? That isn't even scripting.
~ Usering ~ |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:50 PM |
Nice free model. Just put this script straight into the model and remove the scripts in both of the teleporters.
Your model should look like this: Model > Script > 1 > 2
tp1 = script.Parent["1"] tp2 = script.Parent["2"] debounce = false tp1.Touched:connect(function(hit) player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and not debounce then debounce = true player.Character:MoveTo(tp1.Position + Vector3.new(0,5,0)) debounce = false end end) tp2.Touched:connect(function(hit) player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and not debounce then debounce = true player.Character:MoveTo(tp2.Position + Vector3.new(0,5,0)) wait(5) debounce = false end end)
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:53 PM |
| I already answered his question dude. |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:54 PM |
What does that mean? There is no restriction on how many answers someone can post.
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2014 11:19 AM |
| True, but posting two answers could confuse him. |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
|
| 28 Feb 2014 11:23 AM |
| Not if they both have the same conclusion that would just teach him more |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2014 04:49 PM |
| I suppose, but mine does what he asked, his is a brand new script that goes in the model, I am assuming that mine is what he will most likely use, if any. |
|
|
| Report Abuse |
|
|
Dunker11
|
  |
| Joined: 16 May 2009 |
| Total Posts: 3070 |
|
|
| 28 Feb 2014 07:50 PM |
2 things.
1: shawnyg answered it. 2: It was a brick and a script I put in it. No free models. |
|
|
| Report Abuse |
|
|