|
| 16 Nov 2014 06:26 PM |
-- script.Parent.Touched:connect(function(hit) print(hit) end)
for i = 1,1250 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-1, 0, 0) wait() end -- The Touched event does not fire. |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 16 Nov 2014 06:31 PM |
| And is there code above it that you have not included? |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 06:33 PM |
| Yes, but running that by itself doesn't function correctly. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 06:39 PM |
I dropped a model on the part and it functioned correctly. However, if the part (script.Parent) touches another part, it does not do anything. |
|
|
| Report Abuse |
|
|
| |
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 16 Nov 2014 06:49 PM |
| Both should fire the Touched event. I still have a feeling you're halting the thread before it gets to the connection line. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 06:52 PM |
There is no code before the connection line. Here's the code in its entirety:
-- script.Parent.Touched:connect(function(hit) print(hit) coroutine.resume(coroutine.create(function() hit.BrickColor = BrickColor.new("Really black") wait(.5) hit:destroy() end)) end)
for i = 1,1250 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-1, 0, 0) wait() end --// |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Nov 2014 07:24 PM |
| I don't think the touched event fires if you change the cframe of an anchored part. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 16 Nov 2014 07:35 PM |
I thought that might be it. Any ideas for workarounds? |
|
|
| Report Abuse |
|
|