A few years ago, when I was working on events in RBLX, we decided to put together a drone show. It was somewhat last-minute, so based on a video from "usercontent" that featured a drone show, I quickly designed something simple yet effective for the event.
Recently, a friend wanted to create a drone show, so I gave him my old script. However, I decided to recreate and improve the script since the original was quite basic, lacking in functionality, and poorly optimized. This led to the birth of this new project. I created it and gave it to him for his event. After the event, I told him I would publish it so that it could be accessible to anyone who wants to use and contribute to this community, which I still hold dear despite no longer being active in it.
There isn’t much to explain about the script itself. It simply creates drones that can perform shows for all connected clients. The drones are generated on each client, and their functions are handled locally. However, the drones are controlled from the server using the API to ensure that all clients see the same show. This setup ensures that the server does not have to expend resources on movements or maintaining additional active actors, among other things.
I found two bugs
- A drone is missing to be generated sometime
- When you use "joint" it may not return to the initial position or rotate from a pivot that is not the exact center.
- Download Release section and add this item to your game.
- Put the folder in "workspace" and configure the "Settings" file.
- Done.
You can use the
Drones-Controller
or delete this and create your custom console.
In Settings file.
-
Whitelist (array): Add members so they can use
Drones-Controller
(only works withDrones-Controller
) -
Speed (number): This is a default speed for drones.
The spawn actor (in folder
Drone
), the larger it is, the more random the output of the drones is.
- Create new folder in folder
figures
and put a custom name.
- Open folder
drone
and copyDrone-Template
to new folder.
- Copy
Drone-Template
as many times as necessary to create your figure.
(optional) you can edit the
Group
value (number) in theDrone-Template
.
- Create new folder in folder
figures
and put a custom name.
- Create a new folder within the previous one created and make the name just numbers (1 - 999..), so that they are identifiable
- Open folder
drone
and copyDrone-Template
to new folder.
-
Copy
Drone-Template
as many times as necessary to create your figure. -
Repeat step number 2 until you obtain the desired number of groups.
(optional) you can edit the
Group
value (number) in theDrone-Template
.
local API = require(game.ServerStorage:WaitForChild("Drones-SS").API)
- Description: Retrieves the names of all figures available.
- Parameters: None
- Returns: A table containing the names of figures.
local figures = API.GetFiguresName()
print(figures) --returns {[1] = "figure1", [2] = "figure2", ...}
- Description: Retrieves the name of the currently selected figure.
- Parameters: None
- Returns: A string representing the name of the current figure.
local figure = API.GetCurrentFigureName()
print(figure) --returns "figure1" or nil
- Description: Retrieves the total number of drones associated with the current figure.
- Parameters: None
- Returns: An integer representing the total number of drones.
local drones = API.GetTotalDrones()
print(drones) --returns 0
- Description: Changes the current figure to the one specified.
- Parameters:
figureName
(string): The name of the figure to change to.
- Returns: None
API.ChangeFigure("figure1")
- Description: Initiates movement for drones.
- Parameters:
modelId
(string or number):ModelId
or"all"
or"joint"
.x, y, z
(number): Movement distances in each axis.speed
(number) (optional): Movement speed.isGlobal
(boolean) (optional): Whether the movement is global or local. Defaultfalse
- Returns: None
--Example 1
API.MoveDrones(1, 0, 0, 10)
--Example 2
API.MoveDrones("all", 0, 0, 10, 4)
--Example 3
API.MoveDrones("joint", 0, 0, 10, nil, true)
- Description: Initiates rotation for drones.
- Parameters:
modelId
(string or number):ModelId
or"all"
or"joint"
.x, y, z
(number): Rotation angles in each axis.speed
(number) (optional): Rotation speed.
- Returns: None
--Example 1
API.RotateDrones(1, 0, 0, 10)
--Example 2
API.RotateDrones("all", 0, 0, 10, 4)
--Example 3
API.RotateDrones("joint", 0, -5, 0, 3)
- Description: Initiates orbiting movement for drones, similar to
RotateDrones
but is infinite - Parameters:
modelId
(string or number):ModelId
or"all"
or"joint"
.xSpeed, ySpeed, zSpeed
(number): Orbital speeds in each axis.
- Returns: None
--Example 1
API.OrbitDrones(1, 0, 0, 10)
--Example 2
API.OrbitDrones("all", 0, 0, 10)
--Example 3
API.OrbitDrones("joint", 0, -5, 0)
- Description: Cancels ongoing movement for drones.
- Parameters:
modelId
(string or number):ModelId
or"all"
or"joint"
.
- Returns: None
--Example 1
API.CancelMove(1)
--Example 2
API.CancelMove("all")
--Example 3
API.CancelMove("joint")
- Description: Cancels ongoing rotation for drones.
- Parameters:
modelId
(string or number):ModelId
or"all"
or"joint"
.
- Returns: None
--Example 1
API.CancelRotate(1)
--Example 2
API.CancelRotate("all")
--Example 3
API.CancelRotate("joint")
- Description: Cancels ongoing orbiting movement for drones.
- Parameters:
modelId
(string or number):ModelId
or"all"
or"joint"
.
- Returns: None
--Example 1
API.CancelOrbit(1)
--Example 2
API.CancelOrbit("all")
--Example 3
API.CancelOrbit("joint")
- Description: Sets the color of drones.
- Parameters:
dronId
(string or number):DronId
or"all"
or"group-GroupId"
or"model-ModelId"
.color
(Color3): The color to set.
- Returns: None
--Example 1
API.SetColor(1, Color3.fromRGB(0, 255, 0))
--Example 2
API.SetColor("all", Color3.fromRGB(255, 0, 255))
--Example 3
API.SetColor("group-1", Color3.fromRGB(0, 0, 255))
--or
API.SetColor("group 1", Color3.fromRGB(0, 0, 255))
--Example 4
API.SetColor("model-1", Color3.fromRGB(255, 0, 0))
--or
API.SetColor("model 1", Color3.fromRGB(255, 0, 0))
- Description: Sets the color of drones.
- Parameters:
dronId
(string or number):DronId
or"all"
or"group-GroupId"
or"model-ModelId"
.transparency
(number): The transparency value to set, which must be between 0 (fully opaque) and 1 (fully transparent).
- Returns: None
--Example 1
API.SetTransparency(1, 0)
--Example 2
API.SetTransparency("all", 0.6)
--Example 3
API.SetTransparency("group-1", 1)
--or
API.SetTransparency("group 1", 1)
--Example 4
API.SetTransparency("model-1", 0.2)
--or
API.SetTransparency("model 1", 0.2)
- Description: Resets drones and various parameters to their default values.
- Parameters: None
- Returns: None
API.Reset()