VFX Scripter Pro is a useful lightweight plugin that I created to help you easily visualize and script VFX without having to run or play the game in Roblox Studio.
Features
- Real-time scripting
- Restore objects to their original state
- Instant visualization
- Looped mode
- Selective physics
- Play Animations
- Save/Load scripts
Examples
Bomb
Goku
Sword Slash
Animation (using the physics beta feature)
Updates
v1.1.0
v1.2.0
v.1.2.1
v1.3.0
Usage
The plugin is fairly simple to use. You can either check out the short YouTube tutorials I made if you’re in a hurry, or read the following for detailed instructions. It is highly recommended to read the latter to prevent issues from happening in your studio. Consider the YouTube tutorials a quick showcase.
Quick Showcase Tutorial
Sword Slash Tutorial
Detailed instructions (recommended)
As said before, this plugin helps you script VFX or mostly anything similar. The way that it works is that you select one or more objects to restore after you are done testing your script.
Selection
After installing and opening the plugin, you should see the widget with a bunch of options. In the MAIN page, under the Selection section, you can select the objects that need to be restored after testing your code. Internally, the plugin will clone the objects and change the parents of the original objects elsewhere to “keep them safe”.
To add one or more objects to restore, select these objects in your workspace or explorer, and then hit “Add Selection”
Note: if you are trying to add nested objects like the screenshot below, the plugin will only take the highest objects in the hierarchy (in this case PartA).
To clear the list of objects to restore, simply hit “Clear Object(s)”
Scripting
Great, we know have the objects that we want to code in our script. We can now go to the SCRIPT page, and choose to “Create Code”. Now, it should look like something like this:
Creating And Writing Code
Obviously, we would want to edit this code, and the only way we can do that is by hitting “Edit”. This will open a new Script where you can edit the code to your desires. You will notice that there is a VspLib
variable (short for VFX Scripter Pro Library). It is strongly recommended to use this when attempting to get any of the objects we put in the list. It’s safer and clearly easier to work with. We can use VspLib.GetInstance(Name)
to get the object with a specific name from our list of selected objects. We can also use VspLib.GetAllInstances()
to get all the objects from our list.
VspLib.GetInstance(Name) Example
Imagine we have these objects that we want to restore:
If we want to get “PartC” for example, we can use the following lines of code:
local VspLib = require(script.VspLib)
local PartC = VspLib.GetInstance("PartC")
The only downside of VspLib.GetInstance
is that it will not detect the actual object’s class. We can partially solve this problem by defining the type like this:
local VspLib = require(script.VspLib)
local PartC: Part = VspLib.GetInstance("PartC")
VspLib.GetAllInstances() Example
Imagine we have this list of Parts that we want to restore:
We can change the BrickColor of all of these Parts by using VspLib.GetAllInstances()
in a for loop like this:
local VspLib = require(script.VspLib)
for _, Part in VspLib.GetAllInstances() do
if Part:IsA("BasePart") then -- Just in case there's a non-Part in the list.
Part.BrickColor = BrickColor.Random()
end
end
Additionally, the VspLib
variable will be treated as a global at runtime. Internally, the plugin will remove that variable, and replace it with the actual VspLib. So changing the variable name will not reference to the actual VspLib
. In simpler terms, do not change that line of code if you want to use VspLib
. It is simply there at the time of editing to provide auto-completion.
Creating Connections (IMPORTANT!)
The plugin does not actually disconnect any connections. It is the responsibility of the user of the plugin to use the VspLib.AddConnection()
function to have these connections properly disconnected. If you do not do this, these connections will stay connected forever and may cause lag and/or other issues in your Studio. The following code will show you how to add a connection:
local VspLib = require(script.VspLib)
local RunService = game:GetService("RunService")
VspLib.AddConnection(RunService.RenderStepped:Connect(function()
print("Hey!")
end))
Note: the same applies for :Once()
.
Note: the plugin will try to clean up for you, but it won’t work 100% of the time!
Creating Code From An Existing Script
There’s also an option to create new code in the plugin by using an existing script. This option will simply copy the code from the selected script in the explorer. It will not write to it.
Clearing Code
To clear code, simply hit “Clear Code”. This action is not reversible, and does not save your code. If you wish to save your code, make use of the Script Library.
Playback
Once we are done writing code for our VFX (or whatever you wrote code for), we can actually run the code in Studio without having to play the game at all.
There are two modes in the playback section: you can either loop it or not. You can simply tick the “Looped” checkbox to change the mode. Using the looped mode, you can change the interval between each run by using the “Interval” slider. This can go from nearly an instant to ten seconds.
Now finally, we can play the code by pressing “Play”. The moment you press that button again, it will stop the playback, destroy the clones, and bring your objects from your list back to their original parent.
Physics
There’s also an option to use physics. It is recommended to not use this feature in your main project to prevent issues from happening. You can control the physics speed by simply using the slider below the physics button. You can access the physics speed in the script by using VspLib.GetPhysicsSpeed()
Scripting in real-time
It is possible to script in real-time. Simply use the looped playback mode and set the desired interval. Then you can script and see the results instantly (if your interval is small enough). Make sure your code is safe enough to be ran in real-time. The wrong typo could cause permanent damage in your Studio. Therefore this should NOT be used in your main project.
Credits
UI Library - @something786
Feedback
This is my first ever serious plugin. Please share feedback for future reference and share anything you have made with this plugin. I am happy to answer questions!
Would you use this plugin?
- Yes!!!
- No, I don’t understand it / it’s too confusing.
- No, it’s missing something.
- No, I don’t need it.
0 voters