Hi, Sorry if this is a Duplicate Post but I have been looking for a way for a way to have the Player Arms move like a viewmodel when in First Person for a while now,
The Issue I have is that it involves Different Math rather than a Simple SetPrimaryPartCFrame with a Viewmodel, and setting CFrame similarly to that will make the Arms disappear, fly away, or fling the Player
I wont ask for much but how would i set the Players Arms to the Camera like with the Viewmodel?
I don’t want a Script as i don’t want an entire system. Just maybe an explaination on certain functions to use?
I’ve been following your posts for a while, and I think the prominent issue is that you have yet to learn the mathematical material needed to successfully tackle your situation. My guess is that you’ve been trying to decipher code that achieves what you’re trying to do, but haven’t learned the math material required to completely comprehend it all. This is most likely the “Different Math” you are referring to, and it’s a branch of mathematics called trigonometry that most students are typically introduced to in the 8-10th grade. However, you do not have to wait to learn this material. There are many great resources online that can teach you trigonometry, provided you have a competent mathematical foundation. You clearly are an ambitious learner, so I suggest the first step you take is to try to learn this math. It’s essential for what you are trying to achieve here.
As for strictly the arm to camera system, I think a common, general approach is to constantly update a clone of the player’s arms (a viewmodel) in a reasonable position relative to the camera. This is typically done with the help of RunService’s RenderStepped, combined with a custom “animator” function that, provided predefined CFrame values, will “tween” the animations in front of the camera. There are many examples of this online.
However, I don’t believe the “welding to camera” effect is the difficult part of the animation system. Being able to accurately position these animations is the challenging part, and this is where trigonometry plays a role. I highly recommend that you just simply take the time to learn how these mathematical functions operate. It will serve you much better than trying to find workarounds that don’t involve it.
If you would like some resources that can help you learn trigonometry, I can send you some, just let me know.
I have already tried this with some success, the only issue was that it wouldnt stay together and would Eventually fall apart even with Motor6D’s, but thats not what i want, im refering to the Actual Player’s Arms rather than a copy
You did mention that your character got flung a few times before. Did you make sure you disabled the shoulder joints before changing their CFrame’s? I’ve had issues in the past with this.
I already get the basics of Sine, Cosine, and tangent, but i wasnt sure how they were used in code, I dont yet understand arcsine, arcosine, and arctangent, nor the hypothetical versions
Khan Academy has an entire free course on trigonometry, complemented with lots of media to help you out visually. It also shows you the specific lessons, so if you already know some of the material (as you say you know some of the basic trigonometric functions) you can choose to read the more advanced lessons.
Not only do i get flung, its just not properly alligned, however it may be due to me not understanding certain CFrame functions like ToObjectSpace or Inverse, kind of embarrassing as im already going into high school
The resource starts with an overview some prerequisite knowledge. You should review those sections to ensure that you have the mathematical background to understand the actual trigonometry part.
Not only do i get flung, its just not properly alligned, however it may be due to me not understanding certain CFrame functions like ToObjectSpace or Inverse , kind of embarrassing as im already going into high school
It’s not embarrassing at all lol. Understanding CFrames is very conceptually difficult and there aren’t many great resources out there that fully explain how they work. I would genuinely love to explain it all to you right now, but obviously, that would take a very long time. Again, understanding CFrames fully does require you to understand the fundamentals of trigonometry, so I really think you should get started there. It may be difficult to learn on your own, but it would seriously benefit your scripting abilities and would greatly help you achieve what you’re trying to do here (also it will help you when you get to trigonometry in your math class lol).