Hello, I have a 1x1x1 part that is connected to another part through a weldconstraint. My goal is for when the 1x1x1 part rotates the other part rotates with it; that way the larger part is rotating around an axis besides its middle.
My first script was basically this 1x1x1 part.Orientation = Vector3.new(0, (Frame.Rotation * -1), 0)
Which worked; however the part welded to it didn’t rotate with it.
I then tried using this script which does rotate the welded part but not accurately or smoothly, as shown in the video below. Hinge.CFrame = Hinge.CFrame * CFrame.Angles(0, (Frame.Rotation * -1), 0) https://gyazo.com/2c3115434b07d8d5c890e6190db3b914
The white bar on the joystick acts like a compass and always rotates to point in the direction that the joystick is moved. This way I can get the rotation of the bar and apply the same rotation to the 1x1x1 part.
How can I make the 1x1x1 part accurately rotate in the same direction as the white bar, while also having the welded part rotate with it? Thanks!
Yes, so I added math.rad and it’s working much better. However it moves the player back to the center of the workspace like this https://gyazo.com/528a82817832640f5f75e926916f14dd
What could by causing this? Thanks.
The forcefield also spawns where the player always moves to as in the video, however no part of the model is in the area that the forcefield spawns. Could there be a correlation between the forcefield spawning in the same spot the the player always moves to?
This is the only part of the script that actually moves the hinge (1x1x1 part).