NPC Projectiles?

Okie ~ So to summarise, I’m working on a Magic-based game.
Currently I have a method for Players casting spells in which it’s entirely Client-Based however relies on the Server for authentication / sanity checks.
This works by using Modules for each spell individually, :FireAllClients() however only :FireServer for the Client that the Player the Spell belongs to –

I’m looking to implement NPCs that are also capable of using said Spells however I’m unsure how to work them into the Module as it’s heavily focused on Player usage? Would it be best to create a different Mechanic or would there be a method of allowing the NPCs to also do this? I’m yet to officially try anything as looking for concepts at the moment but the issue being that if I use :FireAllClients for an NPC it’ll be unable to :FireServer a single time as there’ll be no Client ownership similar to how the Players magic works?

i would need more information to really help you, however you might want to create bindable events as well as remote events for all of the server functions, this way the server can interact with the system also

im not 100% sure how you have your system set up but this is what I currently do for mine:

1: client script tells server to run magic ability.

2:server runs magic ability module.

3: the module uses runservice to contain both client and server code, server code runs and then tells all clients to require the same module and passes a table of whatever data you want the client to have.

4: client runs same module but only the client sided code.

same thing can be implemented for NPCs, except NPCs can skip step 1.