of     1   

0PTlC
#42531192Monday, February 14, 2011 8:56 PM GMT

Hi all- I am working on a run script right now that disables crouching while you run. I wrote "Tool.Crouch.Disabled = true" and then wrote the lines of the run script. After that I wrote the same thing except false, so it disables. The problem is, the crouch script does not work after you disable it. Does anyone know why?
TaslemGuy
#42531358Monday, February 14, 2011 8:59 PM GMT

0PTlC
#42531994Monday, February 14, 2011 9:12 PM GMT

The point was, does anyone have any idea why it would not re-enable?
bailinbone15
#42532176Monday, February 14, 2011 9:16 PM GMT

Try Scripting Helpers.Also, recopy the script, it'll work again.
miloguy
#42548763Tuesday, February 15, 2011 1:40 AM GMT

Enabling a script doesn't run it. Try this: function runScript(s) local c=s:clone() c.Disabled=false c.Parent=s.Parent s:Remove() end
0PTlC
#42566363Tuesday, February 15, 2011 4:55 PM GMT

Okay, thanks. I will try that. So basically your saying, that enabling the script doesn't make it run, you have to make it run after you enable it to make it work?
miloguy
#42588327Wednesday, February 16, 2011 1:19 AM GMT

Yeah. Moving a script's parent runs it if it's not disabled.
0PTlC
#42591688Wednesday, February 16, 2011 2:04 AM GMT

So do I replace the c or s with the scripts name?
miloguy
#42592678Wednesday, February 16, 2011 2:19 AM GMT

Neither. You add that function to your code, then later call runScript(SCRIPT'S NAME HERE) to run that script
0PTlC
#42824848Monday, February 21, 2011 12:43 AM GMT

Still didn't work. I tried running the scripts again.
MrBCGames
#42825995Monday, February 21, 2011 1:00 AM GMT

For one, I can tell your not using edit mode. Second, you disabled the script, therefor it cannot be re-enabled using the disabled script.
miloguy
#43056248Friday, February 25, 2011 1:27 AM GMT

@Opt I don't know, just make it enable it, then re-parent it or something

    of     1