skill24
|
  |
| Joined: 14 Jun 2009 |
| Total Posts: 13608 |
|
|
| 18 Jul 2016 02:16 PM |
Its triggering even though nothing has touched it to begin with.
Here's my code if interested..
local bars = script.Parent.Parent local active = true
script.Parent.Touched:connect(function(hit) if hit.Name == "Right Leg" and active == true then active = false dropBars() end end)
script.Parent.TouchEnded:connect(function(hit) if hit.Name == "Right Leg" and active == false then wait(2) active = true raiseBars() end end)
function dropBars() for i = 0, 7, 0.5 do bars.CFrame = bars.CFrame - Vector3.new(0, i, 0) wait() end end
function raiseBars() for i = 7, 0, -0.5 do bars.CFrame = bars.CFrame + Vector3.new(0, i, 0) wait() end end
|
|
|
| Report Abuse |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Jul 2016 02:18 PM |
Use magnitude instead or Region3. Touched is unreliable and buggy
|
|
|
| Report Abuse |
|
skill24
|
  |
| Joined: 14 Jun 2009 |
| Total Posts: 13608 |
|
|
| 18 Jul 2016 05:20 PM |
How do you use Region3 to refer to the position of the part? Not familiar with it
|
|
|
| Report Abuse |
|