Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I trigger another script through a script?

Asked by 6 years ago

I'm currently in the process of making an automatic show. It would be so much easier if I could trigger another script instead of repeating the same lines simply just for fireworks. Any tips? Thanks! -IPhoneDrew

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 5 years ago

you can put it in a while loop your fireworks script. I show two methods.

local function fireworks()
    -- idk what you'd do here 
end

while true do
    fireworks()
    wait(1)
end

--//OR\\--

-- from another script

while true do -- change to however long
    Fireworks.Disabled = not Fireworks.Disabled -- assuming Fireworks is the name
    wait(1)
end

Ad
Log in to vote
1
Answered by
Nep_Ryker 131
6 years ago

You can just do something like this:

script.Parent.DisabledScript.Disabled = false -- This will enable the script called "DisabledScript"

If you want to disable it, just set it to true.

0
Scripts have the option in their properties that is called "Disabled" if it's ticked, that means that the script is disabled and will not run in the game unless if an another script enables it. Nep_Ryker 131 — 6y

Answer this question