|
| 27 Feb 2014 05:16 PM |
http://www.twitch.tv/keyrut/b/506877306 yay |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 05:23 PM |
| It includes how to teleport / Set up. |
|
|
| Report Abuse |
|
|
Reshaped
|
  |
| Joined: 23 Oct 2013 |
| Total Posts: 4110 |
|
|
| 27 Feb 2014 05:34 PM |
Can you start? I'm watching!
~We Build on Each Other~ |
|
|
| Report Abuse |
|
|
Reshaped
|
  |
| Joined: 23 Oct 2013 |
| Total Posts: 4110 |
|
|
| 27 Feb 2014 05:36 PM |
Nvm. It's a record!
~We Build on Each Other~ |
|
|
| Report Abuse |
|
|
| |
|
Reshaped
|
  |
| Joined: 23 Oct 2013 |
| Total Posts: 4110 |
|
|
| 27 Feb 2014 05:46 PM |
Umm, small problem. The local script you provided, can I insert it into well let's say brick that teleports us?
And btw, is the script one whole code because when I copy and paste it it's one whole code. :P
~We Build on Each Other~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 05:51 PM |
Well if you want it to be on touch then script.Parent.Touched:connect(function(yay) if yay.Parent:findFirstChild("Humanoid") ~= nil then player = game.Players:GetPlayerFromCharacter(yay.Parent) game:GetService("TeleportService"):Teleport(111111, player) end end)
|
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 05:52 PM |
By the way, that is made for a default script. Not Local. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 06:55 PM |
anyone else need help ye no |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:18 PM |
@Lei, your script would break if the hit's parent is workspace.
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:23 PM |
I did add >if then< but, with else.
script.Parent.Touched:connect(function(yay) if yay.Parent:findFirstChild("Humanoid") ~= nil then player = game.Players:GetPlayerFromCharacter(yay.Parent) game:GetService("TeleportService"):Teleport(111111, player) else print("Nope") end end)
|
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:27 PM |
It would still break if the hit part is a child of an NPC. You don't need an else. If it doesn't exist then the script doesn't do anything.
id = 1337 debounce = false script.Parent.Touched:connect(function(hit) player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and not debounce then game:GetService("TeleportService"):Teleport(id,player) end end)
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:32 PM |
Regardless of a Debounce, it gets you to your destination.
|
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:33 PM |
I'm not talking about debounce. I didn't even implement it fully into my script. I'm talking about if the hit is an NPC instead of a real player.
id = 1337 debounce = false script.Parent.Touched:connect(function(hit) player = game.Players:GetPlayerFromCharacter(hit.Parent) if player and not debounce then debounce = true game:GetService("TeleportService"):Teleport(id,player) wait(2) debounce = false end end)
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:34 PM |
| Well a real question is, why would there be a NPC Players strolling around hitting Teleport bricks in the first place? |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 27 Feb 2014 07:37 PM |
What if there are and it breaks the script?
~ Usering ~ |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:40 PM |
Well, I just tested >script.Parent.Touched:connect(function(yay) if yay.Parent:findFirstChild("Humanoid") ~= nil then player = game.Players:GetPlayerFromCharacter(yay.Parent) game:GetService("TeleportService"):Teleport(111111, player) else print("Nope") end end)
And with a humanoid walking on it, it seems perfectly fine, no errors. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:40 PM |
In addition of >script.Parent.Touched:connect(function(yay) if yay.Parent:findFirstChild("Humanoid") ~= nil then player = game.Players:GetPlayerFromCharacter(yay.Parent) game:GetService("TeleportService"):Teleport(111111, player) else print("Nope") end end) Works too.
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 27 Feb 2014 08:54 PM |
| Bump since everyone is curious atm. |
|
|
| Report Abuse |
|
|
| |
|