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