The desired effect is produced, but when the player turns the rotation screws up, as shown in the video: Orientation
Since the part is welded, I cannot tween the CFrame instead of the orientation since that messes it up. I also tried replacing the tween with a repeat loop, which fixes this problem, except the player falls over every 90 degrees (Even though it is massless and RootPriority is -1).
No you just set the attachments of the WeldConstraint to attachments in a part and then it will stay welded no matter where you move the part. No scripting necessary.
I tried that. It seems to work, except it completely bugs the player out and they get flung all over the place, basically the same issue as when I tried a repeat loop. Do you know how to stop this?
You can try to tween the weld’s C0 or C1 properties (if C0 is set already, you can use C1 for the tweening)
C0 and C1 are only accessible from the Weld object and not the newer WeldConstraint
C0 and C1 determine the offset between Part0 and Part1, with CFrames. Unlike a WeldConstraint, the offset is not calculated automatically (but I like that )
you should be able to do something like this
Weld.C0 = CFrame.new(3,0,0) -- I am surprised in your example that you are using the X axis and not the -Z axis
local Tween = TweenService:Create(Weld, SpinTweenInfo, {C1 = CFrame.Angles(math.rad(180,0,0)}) -- Might be the wrong axis? If it is, try the Z axis
Tween:Play()
Thank you! This almost works perfectly. I just can’t figure out how to get it to rotate clockwise, no matter what combination of axis I try it just rotates the wrong way. I’ll keep trying and maybe post it as a new problem if I can’t figure it out. Have a great day
Update: I managed to fix it, I just had to tweak the C0 with some CFrame.Angles so it matched the player’s rootpart. The script works perfectly!