generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Roblox » All Things ROBLOX
Home Search
 

Re: A tutorial for universes:

Previous Thread :: Next Thread 
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 05:16 PM
http://www.twitch.tv/keyrut/b/506877306
yay
Report Abuse
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 05:23 PM
It includes how to teleport / Set up.
Report Abuse
Reshaped is not online. 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 is not online. 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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 05:44 PM
lol
Report Abuse
Reshaped is not online. 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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 05:52 PM
By the way, that is made for a default script.
Not Local.
Report Abuse
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 06:55 PM
anyone else need help
ye no
Report Abuse
Usering is not online. 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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
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 is not online. 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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 07:32 PM
Regardless of a Debounce, it gets you to your destination.
Report Abuse
Usering is not online. 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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
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 is not online. 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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
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
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 07:41 PM
An NPC Humanoid*
Sorry
Report Abuse
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 08:01 PM
any other questions
Report Abuse
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
27 Feb 2014 08:54 PM
Bump since everyone is curious atm.
Report Abuse
LeiNuoCheng is not online. LeiNuoCheng
Joined: 23 Nov 2011
Total Posts: 6292
28 Feb 2014 09:18 PM
Another bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image