Here’s a picture of what i have already done:
There seems to be a problem when you press R on keyboard to reload the gun. I was unable to make the LimitedAmmo subtract when R was pressed when the gun did not lose all the ammo yet. It does not seem like the key R can be used in other scripts for UserInputService. This is to blame the Weapons Kit System.
However, i did find a way to disable reloading when R is pressed, and just wanted to ask you if you’d want to have it disabled. Cuz otherwise, the ammo system can easily be misused
If the player can abuse this method
Yes disable
I wish i can do a fix on this but id have to deeply modify the weapon’s kit, making sure no errors occur.
Okay, so to disable reloading, you have to go to your own WeaponSystem folder which should only be placed in ReplicatedStorage. In the WeaponSystem folder, go to the WeaponTypes folder, and go in the BulletWeapon module script. Press Ctrl H and search onReloadAction in the bar. There will be 2 matches for this only, you want to go on the first match. It should look like this:
On the very end of the line, you will see Enum.KeyCode.R. Just remove that and reloading when R is pressed will be disabled. it shall look like this:
Before:

After:

one more question: can people have as many weapons as they want at the same time (like in the backpack i mean), or they can only have one weapon in the backpack? And is there other tools that will be included in the backpack (like medkit or something)? Im asking because i need clarification to know if i am ready to give the ammo system or not
Thanks for the tutorial above. Yes, the player may find other items in the game
ok GOOD NEWS! Im pretty much FINISHED the ammo system entirely. I was thinking maybe since i couldnt do anything for the reloading part, i could create our own reloading system.
Want me to create a custom reloading system, its pretty simple tbh, just gotta use UserInputService in a local script with a cooldown, fire a remote event to the server and do the math for the CurrentAmmo and LimitedAmmo on a server script. Only hard part is the animation lol
It would be nice if the reload system was in the gun, but I do not want your work to be too hard
Well id say i will do it. I dont want a “complete” system that is missing the last key, and it may be an issue for players when they cant reload when pressing R, that could seem unfair to them, you know?
Plus, i only use my time on roblox studio, not playing games, so i really dont mind doing this at all, bcz i think this is fun, and what else would i be doing in roblox studio?
Yes, I think like you, the game has to be made in the best way
But I saw in your roblox profile that you are working on a game
I did not want you to get too tired for this
Otherwise I would love to have a system r weapon
But now that you want to fix it, thank you
I was browsing the dev forum roblox today and came across some good animations, I hope it good
High-Quality R15 Gun Animations
okay thanks lol, my time is saved.
Im nearly done the custom reloading system, just have to fix some bugs and it will pretty much be good to go.
Im done the ammo system, and just about to finish the reload system. I gtg now for a few hours, i will reply once i come back
Thanks for the info, I’m looking forward to the full system
Hey sorry for replying very late. Ive been dealing with a silly bug with the reloading system, where when you press R, but shoot while reloading, and press R again within the reloading time (2 seconds) after pressing R the first time, the gun reloads instantly without waiting.
I obviously know what the problem was, but was struggling how i was able to fix it. However, I did find a good fix, by checking when the reload Sound finishes playing, then it reloads the ammo. But the thing is that reloading would take a lot more time than usual, since the code is depending on when the sound will fully finish playing.
Im not sure if you dont mind at all, and just wanted to ask if you want the script that handles the reloading to depend on when the Sound will finish playing, and then changes the ammo
I think it’s better when you press R and wait a few seconds and then it reloads
Because even in a real gun, you have to take the ammunition out of the gun at the time of reloading and put new ammunition inside the gun, the same steps in the real world take a few seconds.
And for the sound, well, if the sound plays when reloaded, it’s better
I agree
Sound is definitely played when pressed R (when reloading).
I was just saying this because sometimes there is unnecessary audio that is left playing without stopping until a few (maybe even just 1) seconds. So if you press R to reload gun, it will wait for the reload audio to finish playing (even with the unnecessary audio that’s left) , and then change the ammo.
If you are finding different reloading audio, then please beware of the unecessary audio thats at the end before choosing.
If you are good with all this, then Im pretty much finished everything!
Well, I think it’s better not to have unnecessary audio
But you are more experienced than me and you know better things
If you can change the sounds later and remove the unnecessary time and sound (just by changing the sound) it is good
I look for better sounds and replace them
Well i meant like if you are using different reload audio, rather than the original reload audio from the roblox Weapons Kit, then you should beware of what audio you are choosing, because sometimes that audio you are choosing MIGHT have empty audio left after the reloading sound is already done playing.
Hopefully this makes sense
Oh ok thank you
From now on, I will pay attention to this