Hi Devforum members,
I was wondering about how to make a Model-based weapon (basically not an actual Tool).
I been struggling to do it and there’s no guides or explanation. It’s supposed to be a unique thing to do and in some games it appears nicer on the characters.
I tried to make it but i cant figure out how you animate or even work with a non-tool item. I know it’s possible though I just am wondering how to do it.
Apart from making it look nicer, are there any other advantages to this method? Though it depends on what kind of game you’re making, I wouldn’t advise using this method just because it makes tools look nicer.
A mix of local scripts, server scripts, remote events and user input service can get that for you.
Local Scripts:
All UserInputService managing, maybe a few other things, such as animations.
Server Scripts:
Creating the tool model in the characters hand, managing all functions required by the tool, so if you have a sword that when you active it, a hitbox gets created, you’ll want to create a hitbox on the server, to avoid cheaters creating their own hitboxes.
I made my own gun system using no tools, and given its very poorly scripted, it pretty much is a tool without it being a tool, just its locked to only 2 guns/tools.
Since making it, i have made the game clonable, so if you want to, you can look at the games code here.
It may be the animations then, since theyre owned by my group, and are loaded upon playing the game.
Somewhere in startergui, there is a loading screen script, just try to find that and remove the lines that load the animations.
Also, last time I checked (which was a few days ago), besides a few map issues, the game worked perfectly fine.
I just remembered, the guns may ALSO not work, as they also load the animations.
The lines that load the animations are
Line 637 to 653, and then any part of the script that references ViewModelAnims, just remove that line if possible.
Also, feel free to use my terrible code on that game as reference for your own system, or just fully copy-paste parts of it into your system, i dont really care whats done with the code.
ALSO
Please do not look in ServerStorage, UI_Elements, ModMenu, Main.
Please just delete the script.
There is something REALLY embarrassing i forgot to remove, which i just removed upon looking in the code.