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 » Scripting Helpers
Home Search
 

Re: Script breaks after several times without output

Previous Thread :: Next Thread 
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
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
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
05 May 2014 02:32 PM
BuHmmmp.
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
05 May 2014 02:57 PM
Again ignore
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
06 May 2014 08:54 AM
I need this fixed..
Report Abuse
vlekje513 is not online. 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
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
06 May 2014 09:05 AM
How should I do it?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
06 May 2014 01:15 PM
..?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
06 May 2014 02:52 PM
Bump
Report Abuse
simplefate is not online. simplefate
Joined: 05 Apr 2014
Total Posts: 201
06 May 2014 02:56 PM
Try using ~=true instead of using false?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
06 May 2014 03:06 PM
But after the script ran, it needs to be false again
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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