|
| 05 May 2014 02:06 PM |
Hai there, This script breaks after several times using it (sometimes after one time using it) and I don't know why.. Can chu help me? :D
open = false P = script.Parent
a = Instance.new("Motor", script) a.Part0 = P.Hinge2 a.Part1 = P.Door2 a.C1 = CFrame.new(1,0,0) a.MaxVelocity = 0.03
b = Instance.new("Motor", script) b.Part0 = P.Hinge1 b.Part1 = P.Door1 b.C1 = CFrame.new(1,0,0) b.MaxVelocity = 0.03
function onTouched(part) if open == false then if part.Name == ("Handle") then open = true if part.Parent.Name == ("OVchipcard") then P.Parent.AntiTrespass.AllowedPlayer.Value = part.Parent.Parent.Name if a.DesiredAngle == 0 then script.Parent.Parent.AntiTrespass.Active.Value = true a.DesiredAngle = math.pi/2 b.DesiredAngle = -math.pi/2 wait(2) a.DesiredAngle = 0 b.DesiredAngle = 0 script.Parent.Parent.AntiTrespass.Active.Value = false open = false end end end end end
P.Parent.Sensor.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 06 May 2014 08:57 AM |
| Debounce was never false again since the statement was false. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 06 May 2014 02:56 PM |
| Try using ~=true instead of using false? |
|
|
| Report Abuse |
|
|
|
| 06 May 2014 03:06 PM |
| But after the script ran, it needs to be false again |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 11:32 AM |
| I need to revert my place just because of this stupid script -_- is there really nobody who can help? |
|
|
| Report Abuse |
|
|