Issues tweening a model

I’m attempting to make a functional NVG system, I have everything with the lighting set up and such, as well as the UI but my main issue is attempting to tween it with a script & num value.

I’m using an accessory based morph system, but I can’t really find a proper alternative to tween the model, The main issue is that it’s moving the entire character, which is obviously due to everything else being welded, but once again I can’t find a functional alternative.

 if team == "MTF" then
        if morph == "U-11" then
            local nvgModel = char:FindFirstChild("Head+").Handle:FindFirstChild("GPNVG-18")
            local TweenValue = nvgModel.TV
            
            local TI = TweenInfo.new(3, 
                toggle and Enum.EasingStyle.Sine, 
                toggle and Enum.EasingDirection.In or Enum.EasingDirection.Out)
            
            local angle = toggle and math.rad(-105) or math.rad(105)
            local originalCFrame = nvgModel.PrimaryPart.CFrame
            local targetCFrame = originalCFrame * CFrame.Angles(angle, 0, 0)
            
            local T = TS:Create(TweenValue, TI, {Value = 1})
            T:Play()
            
            local connection
            connection = TweenValue:GetPropertyChangedSignal("Value"):Connect(function()
                if TweenValue.Value <= 0 then return end
                local newCFrame = originalCFrame:Lerp(targetCFrame, TweenValue.Value)
                nvgModel.PrimaryPart.CFrame = newCFrame
            end)
            
            T.Completed:Connect(function()
                TweenValue.Value = 0
                connection:Disconnect()
            end)
        end
    end

i am bumping this b/c no reply :frowning:

What exactly are you trying to tween, what’s the model? From what I can understand, you want to tween the position of an accessory in a character?

It’s a sort of NVG thing, as I said I’mn trying to find a suitable alternative as it won’t work due to the model being welded to an accessory and I can’t find an alternative as previously said.

Have you tried unwelding it or tweening the welds instead?

1 Like

i’ve tried unwelding but not tweening the welds

only issue is when i try to manipulate C1 and C0 it just kind of messes everythin up

Ended up fixing this using a Motor6D :blush:

1 Like