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: HELP!!

Previous Thread :: Next Thread 
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
07 Jun 2016 04:29 AM
Could someone make me a script where a part keeps moving forward until it touches a brick then regens to oroginal place and then repeats the cycle?


Report Abuse
Exovis is not online. Exovis
Joined: 08 Jan 2015
Total Posts: 1027
07 Jun 2016 04:35 AM
local urpart = URPARTSLOCATION
while true do
wait(0.01)
urpart.CFrame = urpart.CFrame + Vector3.new(1, 0, 0)
function onTouch(hit)
if hit.Name == "namething" then
urpart.CFrame = CFrame.new(0, 0, 0)
end
end
end
script.Parent.Touched:connect(onTouch)


^ my 11/10 very bad probably wrong tired example


does not compute
Report Abuse
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
07 Jun 2016 04:55 AM
The part keeps going forward but when it touches the a brick it just goes through it.


Report Abuse
Exovis is not online. Exovis
Joined: 08 Jan 2015
Total Posts: 1027
07 Jun 2016 04:58 AM
oh

for hit.Name

put
hit.Parent.Name

my bad


does not compute
Report Abuse
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
07 Jun 2016 05:01 AM
still does the same thing D:


Report Abuse
Exovis is not online. Exovis
Joined: 08 Jan 2015
Total Posts: 1027
07 Jun 2016 05:02 AM
i'd love to help
but it's 5 am
and my brain only works properly when i have 93 different intrusive thought trains bursting into it



does not compute
Report Abuse
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
07 Jun 2016 05:03 AM
is this correct?

local urpart = game.Workspace.Asteroid
while true do
wait(0.01)
urpart.CFrame = urpart.CFrame + Vector3.new(1, 0, 0)
function onTouch(hit)
if hit.Parent.Name == "TestBrick" then
urpart.CFrame = CFrame.new(0, 0, 0)
end
end
end
script.Parent.Touched:connect(onTouch)


Report Abuse
Exovis is not online. Exovis
Joined: 08 Jan 2015
Total Posts: 1027
07 Jun 2016 05:07 AM
probably 90%

it's not your fault its mine
i keep my functions and stuff in a folder but i forgot to put touched


go google "roblox ontouch" and go to the wiki page that pops up
night



does not compute
Report Abuse
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
07 Jun 2016 05:43 AM
does anyone else know how to fix this?


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
07 Jun 2016 07:06 AM
Let me guess. The part just disappears?
Report Abuse
iReIix is not online. iReIix
Joined: 31 Aug 2010
Total Posts: 5175
07 Jun 2016 07:06 AM
No it just goes through everything


Report Abuse
killerbot29003 is not online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
07 Jun 2016 08:00 AM
local current = script.Parent.Position



Instance.new("BodyVelocity", script.Parent).Velocity = Vector3.new(0,10,0)

script.Parent.Touched:connect(function()
script.Parent.Position = current
end)



not the best but works


This siggy is copyrighted ©
Report Abuse
killerbot29003 is not online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
07 Jun 2016 08:01 AM
Also OP, reply on the message I sent you



This siggy is copyrighted ©
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