Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why doesnt a local script activate when its been undisabled by another script?

this is what its used to undisable it

local function disable()
    if not game.Workspace.Interactables.Cube.Anchored then
        script.Parent.Tutorial6.Disabled = true
    end
end
 
repeat disable(); wait()
until script.Parent.Tutorial6.Disabled == false

and this is the script thats being undisabled

local text = "To start, Left Click the cube."
	game.Workspace.Map.TutorialRestriction.Invis1.CanCollide = false
	script.Parent.Tutorial.Click.Playing = true
for i = 1, #text do
    script.Parent.Tutorial.Gui.TextLabel.Text = string.sub(text, 1, i)
  wait(0.0625)
end
if text ==  "To start, Left Click the cube." then
    script.Parent.Tutorial.Click.Playing = false
    repeat
    if game.Workspace.Interactables.Cube.Anchored == false then
        script.Parent.Tutorial6.Disabled = true
    end
    until script.Parent.Tutorial6.Disabled == false
end

2 comments

0

I don't really get what you're asking, the first script is constantly disabling it and then checking if it isn't disabled.

0

im trying to make a tutorial and only move to the next part when the previous part has been comleted

1 answer

I really suggest simplifying it by putting the ServerStorage to use. Like this:

--Script Disabling
local localscript = game.ServerScriptService.LocalScript --Or any other place you have placed it in.
localscript.Parent = game.ServerStorage

And then for the enabling:

local localscript = game.ServerStorage.LocalScript
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.

2 comments

0

sorry for not giving enough imfo but im trying to make a tutorial and only move to the next part when the previous part has been completed, and thats why im having it constantly check if the part is unanchored

0

Oh! i've figured it out! it takes a whilebut i have to add a letter every time, it works, thanks to everyone who tried to help!

This discussion is preserved as it was. New answers, comments, and votes are closed.