VFX Module
In your wally.toml file, add this to your dependencies:
You have two solutions to import this module, depending if you wish to import the Controller or the Service on your own, or if you let the module give you the right code.
Configuration
A file called VfxModule.config.lua is to be created in ReplicatedStorage/Shared/Configs.
Explanation:
TemplateVfx: The name of the VFX (its identifier.)
callback: A function that's called when triggering the vfx.
sanityCheck: A function that runs to make sure the vfx should indeed be played for all other players or if it's triggered by a cheat. must return true for the vfx to play.
Usage
Events
OnVfxPlay: Triggers to the server when a client attempt to play a vfx and sent to all clients if the server approves the triggering.
Methods
Client Side
Explanation
vfxName: The name of the vfx to play.
origin: The origin of the vfx (can be anything, it all depends on your callback function from the config)
Client Side
Explanation
folder: The folder of the vfx to play.
origin: The origin of the vfx (BasePart)
particleAmount: The amount of particle that should emit from the emitters inside the folders