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 » Game Creation and Development » Scripters
Home Search
 

Re: How to teleport a brick when it touches another brick?

Previous Thread :: Next Thread 
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
16 Aug 2017 05:47 PM
If you have played miner's haven before, i'm trying to make a teleporter like the ones in that game. When a block hits the teleport sender it automatically appears at the receiver and doesn't work in both directions. I want to make something like that but i cant figure out how. Any help?
Report Abuse
DDontGoOnMyProfile is not online. DDontGoOnMyProfile
Joined: 10 Apr 2017
Total Posts: 110
16 Aug 2017 05:48 PM
script it
Report Abuse
Joz2015 is online. Joz2015
Joined: 03 Nov 2015
Total Posts: 3154
16 Aug 2017 05:58 PM
http://wiki.roblox.com/index.php?title=API:Class/BasePart/Touched
Report Abuse
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
16 Aug 2017 07:17 PM
for i,v in pairs(script.Parent.Parent.TeleporterConveyor:GetChildren()) do
if v.Name == "Teleporter" then
v.Touched:connect(function(Part) then
Part.CFrame = CFrame.new(0, 50, 0)
end)
end
end

i tried this but i dont know why it doesnt work :/
Can someone help or explain how to fix this?
Report Abuse
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
16 Aug 2017 07:28 PM
bump
also im new to scripting so this is pretty confusing :/
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
16 Aug 2017 07:46 PM
try giving the brick a humanoid then disable the health settings and try to target the humanoid of the inside of the part i guess either that or Check out berezaa tycoon kit to see how its done
Report Abuse
bunny_lool is online. bunny_lool
Joined: 12 Jul 2016
Total Posts: 192
16 Aug 2017 07:47 PM
Found it.. you need to do the part where the thing gets touched fir st. Then you do the checking. Also do not put "then" after v.Touched:connect(function(Part) . I think the ")" goes with the last "end", not first end. Lastly, pairs is i pairs(no spaces) not pairs. Tell me if you need help or doesn't work.
Report Abuse
judess69er is not online. judess69er
Joined: 11 Oct 2009
Total Posts: 1132
16 Aug 2017 07:50 PM
you could also check out Zed's Tycoon Kit or Fvii's Tycoon Kit but idk if they did a step by step youtube tutorial for using their kits like berezaa did
Report Abuse
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
16 Aug 2017 08:08 PM
for i,v in pairs(script.Parent.Parent.TeleporterConveyor:GetChildren()) do
v.Touched:connect(function(Part)
if v.Name == "Teleporter" then
Part.CFrame = CFrame.new(0, 50, 0)
end
end
end)

this is what i have now. still not sure if its correct or not. im a noob sorry.
Report Abuse
bunny_lool is online. bunny_lool
Joined: 12 Jul 2016
Total Posts: 192
16 Aug 2017 08:56 PM
Looks pretty good, it should work.
Report Abuse
bunny_lool is online. bunny_lool
Joined: 12 Jul 2016
Total Posts: 192
16 Aug 2017 08:57 PM
btw pairs = i pairs(no spaces)
Report Abuse
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
16 Aug 2017 09:06 PM
it isnt working still. what do you mean by i pairs? do you mean this?

for i,v ipairs(script.Parent... instead of for i,v in pairs(script.Parent...

(type in pairs as ipairs?)
Report Abuse
bunny_lool is online. bunny_lool
Joined: 12 Jul 2016
Total Posts: 192
17 Aug 2017 09:10 AM
Yep.
Report Abuse
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
17 Aug 2017 10:41 AM
Just to be clear this is what you mean:

for i,v ipairs(script.Parent.Parent.TeleporterConveyor:GetChildren()) do
v.Touched:connect(function(Part)
if v.Name == "Teleporter" then
Part.CFrame = CFrame.new(0, 50, 0)
end
end
end)

Correct?
Report Abuse
bunny_lool is online. bunny_lool
Joined: 12 Jul 2016
Total Posts: 192
17 Aug 2017 05:24 PM
Wait i am gonna fix...
Report Abuse
BooYah9999 is not online. BooYah9999
Joined: 18 Sep 2010
Total Posts: 30
17 Aug 2017 08:11 PM
pls help. im so noob lol
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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