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!
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. :)