Okay so, basically I just have several functions doing different things in several different parts, although I'd just like to have one other script to tell them when to run at once if I can.
In more detail to try and explain if I haven't already: Several different parts in the workspace, all with their own script inside. They each have different functions inside those script.
Random examples to run at once:
1 | local function playdisco |
2 | while true do |
3 | script.Parent.Brickcolor = Brickcolor.Random() |
4 | wait( 0.5 ) |
5 | end |
6 | end |
1 | local function changetrans |
2 | while true do |
3 | script.Parent.Transparency = 0.5 |
4 | wait( 0.5 ) |
5 | script.Parent.Transparency = 0.9 |
6 | wait( 0.5 ) |
7 | end |
8 | end |
Use a RemoteFunction object, more info can be found here: Remote Events and functions. P.S consider using a coroutine if you're going to have more than one function at a time using a loop in the same script.
1 | _G.playdisco = function () |
2 | while true do |
3 | script.Parent.BrickColor = BrickColor.Random() |
4 | wait( 0.5 ) |
5 | end |
6 | end |
just make a script and add this
1 | _G.playdisco |
do the same with changetrans
1 | _G.changetrans = function () |
2 | while true do |
3 | script.Parent.Transparency = 0.5 |
4 | wait( 0.5 ) |
5 | script.Parent.Transparency = 0.9 |
6 | wait( 0.9 ) |
7 | end |
8 | end |
1 | _G.changetrans |