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 » Scripting Helpers
Home Search
 

Re: How do I make 1 part move away from another?

Previous Thread :: Next Thread 
orangebaron is not online. orangebaron
Joined: 10 Mar 2012
Total Posts: 686
03 Jul 2013 07:31 PM
For example, if I had part1 and part2 and a script in part2, what text should I give it to make it move away from part1?

> UNBAN KOHL
Report Abuse
SethDusek5 is not online. SethDusek5
Joined: 26 Mar 2011
Total Posts: 2580
03 Jul 2013 07:34 PM
Do you want it to move away when it touches it?
Report Abuse
orangebaron is not online. orangebaron
Joined: 10 Mar 2012
Total Posts: 686
03 Jul 2013 07:39 PM
Well, just a function that would do it

> UNBAN KOHL
Report Abuse
SethDusek5 is not online. SethDusek5
Joined: 26 Mar 2011
Total Posts: 2580
03 Jul 2013 07:45 PM
Insert this script into Part2

I'm not sure if it will work, but it's worth a shot.

script.Parent.Touched:connect(function(hit)
if hit.Name == "Part1" then
local pos = script.Parent.Position
script.Parent.Position = pos - Vector3.new(0, 1, 0) --You can configure which direction it wants to move in
end
end)
Report Abuse
orangebaron is not online. orangebaron
Joined: 10 Mar 2012
Total Posts: 686
03 Jul 2013 07:49 PM
nevermind, i figured it out

> UNBAN KOHL
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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