How do you make a viewmodel arms system?

I want to create a system for first-person viewmodel arms. I want to keep it organized with components and controllers, but I don't know how. Should the arms be part of the object that I'm holding or can they be separate? Should the arms be a component? Any examples or advice on how to build this properly with Flamework would be great.
Solution:
I'd make a controller that controls arms enables and disables, without components. You could add what type of hands to do, animation set to use and prob what weapon to hold...
Jump to solution
29 Replies
Solution
Tester
Tester4mo ago
I'd make a controller that controls arms enables and disables, without components. You could add what type of hands to do, animation set to use and prob what weapon to hold
Mirrox
MirroxOP4mo ago
should the hands be part of the object, or can it be separate?
Tester
Tester4mo ago
^ imo it's better to do the item in viewport hard just cosmetic and to hide a real item Separate ig, or wdym by object?
Mirrox
MirroxOP4mo ago
just any tool ig something that is being held I also want to be able to switch modes (first, second person). Do you know what can be done so that the object is visible in both cases? I assume that I need to hide/show real/viewmodel arms when I change person modes
Tester
Tester4mo ago
^ I think if the arms are purely visual they better not impact anything, so they can exist independently of everything Oh, what about just enabling and disabling viewport hands when you toggle the view?
Mirrox
MirroxOP4mo ago
the item that I'm holding I'm not sure what would happen to it
Tester
Tester4mo ago
Nothing? Can you avoid using the same item in hands and for the character? - cause it's can overcomplicate things imo
Mirrox
MirroxOP4mo ago
I probably can, but... What if, for example, I have some kind of ParticleEmitter in the item? What if the player switches the person when it emits?
Tester
Tester4mo ago
Can you prepare hands for every object? - it sounds as hardcoding but imo it will be the best and least complex
Mirrox
MirroxOP4mo ago
Maybe I can make it so that when something happens, it affects both, the real and viewmodel item But just parenting one of them to undefined so that the other one is not visible do you think that works?
Tester
Tester4mo ago
:0 yeah great idea
Mirrox
MirroxOP4mo ago
Ic, thanks I have to think how to setup it now.. ugh.
Tester
Tester4mo ago
Btw, I think it's better to avoid the viewport frame and just parent them probably to workspace
Mirrox
MirroxOP4mo ago
yeah I will parent it to workspace, It's just being called viewport arms by some people
Tester
Tester4mo ago
Replicated storage/ /Assets /Weapons /Tools /Hands
Mirrox
MirroxOP4mo ago
I think...
Tester
Tester4mo ago
^ then separate hands could be separated in class apparently With animator class that has registered animations for those specific hands
Mirrox
MirroxOP4mo ago
wdym?
Tester
Tester4mo ago
Uhhhh Class for hands And class inside for animator of hands I think
Mirrox
MirroxOP4mo ago
And class inside for animator of hands
I don't quite get this one animator of hands?
Tester
Tester4mo ago
So it's a wrapper of normal animator instance to load animations and can play preprogrammed svfx on top ig
Mirrox
MirroxOP4mo ago
ah
Tester
Tester4mo ago
Yezz
Mirrox
MirroxOP4mo ago
animator instance as roblox's AnimationController?
Tester
Tester4mo ago
I think it's better to just make it a class and not a controller or component
Mirrox
MirroxOP4mo ago
hm
Tester
Tester4mo ago
But at the same time I think it needs guard. Hmmmm Probably some validator?
Mirrox
MirroxOP4mo ago
¯\_(ツ)_/¯ I'll think about it I'll write here if I come up with something if you don't mind, just for feedback maybe a class, that is a part of the CharacterComponent composition, that accepts the character component itself as an argument? It would have methods like addItem<T extends BasePart>(item: T, offset: CFrame): T and loadAnimation(animation: Animation): void. ig I'll just start doing something, I'll change it if it doesn't fit thanks for the help
Tester
Tester4mo ago
Oki Gl

Did you find this page helpful?