I am developing an FPS, and my intuition led me to position guns by wrapping the gun parts into a model and welding the gun’s handle part to the hand of the player. My only concern is that I’ll eventually be blindsided by an inevitable mechanic of how models work, and be forced to switch to the tool instance. I’m aware there is some additional functionality added to the tool with the ContextActionService that models lack (which is not relevant for my situation), but is there any other reasons tools would work better in this case?
It’s up to you.
The tool class is definitely useful, it all depends on what you’re trying to achieve.
Using models and more of a custom tool system definitely gives you more flexibility for your tool. While using tools can have drawbacks, such as automatically creating a weld in the player’s arm to hold the tool up, and also despite having
CanBeDropped turned off, if the player tries dropping their tool it’ll unequip then equip, which creates a weird flash effect which may be undesirable.
Either way would work though. It really depends on what you’re trying to achieve with your game. If you desire to edit a lot of motors in the character to create a realistic FPS experience, a custom view model and tool system would probably be ideal in that case.
Hope this helps.
Some advantages of tools
- built in inventory system
- handy functions for equipping and dequipping
- built in Activated event, other key bindings and controls are taken care of too
- making the tool attach to the character is taken care of
- making the tool go in and out of inventory is taken care of
- making the the tool appear in the workspace (in the character) is taken care of
- still allows for lots of customization
There are probably a few more I can’t remember.
Thanks, this helped clear up a few concerns I had. I definitely will go the modeling approach for the sake of freedom. Now for welding the gun to the character’s hand, would you recommend using motor6d’s? I was originally planning on using good old welds, since I’ve learned most of my developing knowledge back when welds were in fashion. Any reason as to why one would be better than the other? Any gotchas that I should look out for with either? Thanks again.
I think either ones would be fine. I think if you used Motor6Ds that could work with running animations if you had plans of creating animations via the animation editor, but I think other than that they both serve the same purpose.
Awesome. I appreciate the help. Oh and side note, I think based on your username, you would be happy to hear I decided to take up learning c# by completing coding challenges on Hackerrank in c#
That’s awesome! Yeah, I’ve dug into it briefly but hadn’t been pursuing it in recent months.