Help with vfx scripting

I wanna make a vfx handler but honestly dont know where to start, Theres vfx thats shown to only one client or vfx thats shown to everyone, theres vfx thats attached to the player like trails and theres also vfx thats not attached to anything like explosions and such, i was wondering how i could make a vfx handler to handle all of that.

Ive tried searching for ways to script VFX on youtube but they dont show the full picture, I was wondering if someone could point me in the right direction.

IMO, I don’t think vfx logic is something u can really generalize and abstract into some function or something to handle all vfx situations

1 Like

The way I set up my vfx handler is I have 1 local script, and it contains a folder of vfx modules for specific things. So you fire the client with arguments if you want a client based effect to happen, then on the server it’s kind of just the same thing.

1 Like

Ill keep that in mind, i have found a basic way to do it for now tho, thank you!

Yea thats also similar to what i ended up doing, where a client does their vfx via a module and if its a global vfx then the server simply fires all clients and each client activate that vfx via their module

Just be optimized about it for example if an explosion happens 500 miles away from someone make it not display the explosion for that player, because there’s no reason for them to see it from that distance since they wouldn’t see it anyways but if you added it, it’d still affect performance.

1 Like

I can do that with simple distance checks right? ill remember that, thanks!