I’m working on a fan recreation of a ROBLOX game called “Noobs vs Zombies: Relish Reborn”. I’m working on weaponry as of now and I’m wondering if implementing this gun system I was thinking about would be necessary and wanting criticism of how I would format the system and where to start exactly.
(Sorry if this is worded kinda badly)
The gun system would have a “Base” module script. This module script would contain parameters such as “BulletType”, “Spread”, “Recoil”, etc that where given from separate guns. The module would also handle the raycasting of the guns as well.
In the original game I’m remaking, there will be NPC’s who are able to use weaponry like pistols, shotguns, assault rifles, etc, so I’m assuming I would use BindableEvents as an alternative to RemoteEvents in order for the NPC’s to fire their weapons.
Keep in mind that this isn’t a FPS/Third Person Shooter game.
I have not scripted enemy’s with guns but I’ve made a gun system and worked with pathfinding, but would it not be better to just create a module that handles projectiles and then use it on the server validation script and for the enemy’s script? there is no need for server validation as the enemy is already running on the server so bindable events would make the code more confusing.
Nvm completly disregard what I just said that would cause every enemy to esseintially have its own script handling projectiles causing tons of lag. Stick to using a bindable event.