this is what its used to undisable it
1 | local function disable() |
2 | if not game.Workspace.Interactables.Cube.Anchored then |
3 | script.Parent.Tutorial 6. Disabled = true |
4 | end |
5 | end |
6 |
7 | repeat disable(); wait() |
8 | until script.Parent.Tutorial 6. Disabled = = false |
and this is the script thats being undisabled
01 | local text = "To start, Left Click the cube." |
02 | game.Workspace.Map.TutorialRestriction.Invis 1. CanCollide = false |
03 | script.Parent.Tutorial.Click.Playing = true |
04 | for i = 1 , #text do |
05 | script.Parent.Tutorial.Gui.TextLabel.Text = string.sub(text, 1 , i) |
06 | wait( 0.0625 ) |
07 | end |
08 | if text = = "To start, Left Click the cube." then |
09 | script.Parent.Tutorial.Click.Playing = false |
10 | repeat |
11 | if game.Workspace.Interactables.Cube.Anchored = = false then |
12 | script.Parent.Tutorial 6. Disabled = true |
13 | end |
14 | until script.Parent.Tutorial 6. Disabled = = false |
15 | end |
I really suggest simplifying it by putting the ServerStorage to use. Like this:
1 | --Script Disabling |
2 | local localscript = game.ServerScriptService.LocalScript --Or any other place you have placed it in. |
3 | localscript.Parent = game.ServerStorage |
And then for the enabling:
1 | local localscript = game.ServerStorage.LocalScript |
2 | localscript.Parent = game.ServerScriptService --Again, or any place you placed it in. |
Hope that help solves the problem! Next time you make an Enabling/Disabling script, unless it is for GUIs, put your ServerStorage to use. For GUIs, try to use the Enabled/Visible properties. Again, I hope it works.