There is a property in scripts called disabled that stops your script from working when you enable it in studio, but i cant seem to figure out how to enable it with a script. If I could figure it out I could use it to fix one of the major bugs in my game. Thanks!
COMMUNITY QUESTION
Is there a way I can disable a script and enable it again using a different script?
1 answer
Yeah, that's easy! Disabled is a boolean value under local and normal scripts (notice this can't be done with module scripts!) Sample code:
local NEWSCRIPT = Instance.new("Script")
NEWSCRIPT.Parent = game.Workspace
NEWSCRIPT.Name = script
while true do
NEWSCRIPT.Disabled = true --Changed the Bool to true
print('Script was disabled, won't work until disabled is false.')
wait(10)
NEWSCRIPT.Disabled = false --Changed the Bool to false
print('Script was enabled, will work until disabled is checked to true!')
end
Hope this helps! Best regards, 2Loos. :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Are you asking how to enable a script through another one? If so then put script.Disabled = false in the other script that will enable it
ive tried this in the past but it was with a more complex script, i will try again and update you
it worked! tysm!
Please edit your post and put [SOLVED] in the title to mark it as solved.