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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 07 Jun 2016 05:01 AM |
still does the same thing D:
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 07 Jun 2016 05:43 AM |
does anyone else know how to fix this?
|
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 07 Jun 2016 07:06 AM |
| Let me guess. The part just disappears? |
|
|
| Report Abuse |
|
|
iReIix
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 5175 |
|
|
| 07 Jun 2016 07:06 AM |
No it just goes through everything
|
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 07 Jun 2016 08:01 AM |
Also OP, reply on the message I sent you
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|