One of the few ways to move entire models in roblox is using SetPrimaryPartCFrame(). In this case, I’m using a ViewModel and setting it’s PrimaryPartCFrame to the players camera on render stepped. I noticed a really nice effect can be created by using a body gyro in the model and setting it’s CFrame to the players camera CFrame. However, SetPrimaryPartCFrame overrides it.
I’ve tried setting just the ViewModel position to the camera and then using CFrame.Angles() with the ViewModels current Orientation. But, I keep getting an error that the 3rd argument is missing or nil. I don’t think Orientation is the right thing to use, but I’m stumped at what else I could do.
I’ve already said, I’m trying to get the viewmodel to rotate using a BodyGyro without the BodyGyro’s rotation being overridden by the rotational component of SetPrimaryPartCFrame()
Incorrect, The body gyro works perfectly on it’s own, I managed to test this using a body position and a body gyro, It’s just that body gyro updates every frame and primarypart cframe overrides this as it also has a rotational component. Max torque is math.huge. The reason I don’t just use the body position then is because I only want the ViewModel to tail the camera rotation, position should be set accurately, which is why I’m using SetPrimaryPartCFrame on renderstepped.
If you don’t include a rotation in SetPrimaryPartCFrame It then substitutes it to CFrame.Angles(0,0,0) It still overrides bodymover as you are setting a CFrame that has both position and rotational components. Yes, the entire model is unanchored.
Umh, I think you’re confused on what a ViewModel is. ViewModels are basically the arms that are glued to your camera in a fps game. You can only use MoveTo() on a Humanoid entity.
Wasnt aware of that, anyway MoveTo() would make the models position trail behind the actual player aswell, so It won’t be usefull. I’m sorry for any confusion. It’s my bad for not including visual evidence: https://gyazo.com/7896e66a2e6af33dd9c7ee64cd4c8933
For context, I’m trying to make this arm trail behind the camera rotation instead of moving to it instantly on frame like it’s position. However, to set the position I need to use SetPrimaryPartCFrame that also overrides any other rotation I try to add to create the trail effect.
Very weird indeed. I hope someone else can help you. I would love to look into it further, but it’s super late right now and I should go to bed. Good luck buddy!