So im am currently making a simulator game, and i made a settings menu that has an option to turn selling power to "Off" but the sellplace script is still running even tho it says its disabled.The script that detects the mouse click is a localscrip but its disabling the normal script in my sellplace.
COMMUNITY QUESTION
Why is my script runnig even tho it disabled?
1 answer
If there is a script that is forcing another script to be disabled, it may not work.
try creating a BoolValue in workspace and name it Disabled, and put this into your script u want to disable:
if game.Workspace.Disabled == false then
--your scripts here
else
repeat
wait(0.1)
until game.Workspace.Disabled == false
end
The script that is attempting to "disable" the other script should checkmark or uncheck the BoolValue. Disable the script:
game.Workspace.Disabled = true
Enable the script:
game.Workspace.Disabled = false
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
uh what script do? you could use a debounce instead if you are going to enable it again.