How to tween in a A-Chassis Body?

  1. What do you want to achieve?
    Tweening a model inside the body of a AC6 vehicle.

  2. What is the issue?
    The part won’t move.

  3. What solutions have you tried so far?
    Tweening the model.
    Tweening the parts welded together.
    Tweening all parts seperate.

I saw a other post about this problem but there it was about rotating. The fixed it by using a hingeconstraint. I don’t know how to do this with a part needing to tween up and down.

Last Try (Model Tween)

local TweenService = game:GetService("TweenService")
local TweenInfoToUse = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0)

local TweenValue = Instance.new("CFrameValue")
TweenValue.Value = script.Parent.Parent:GetPrimaryPartCFrame()
			
TweenValue.Changed:Connect(function()
	script.Parent.Parent:SetPrimaryPartCFrame(TweenValue.Value)
end)
			
local OnTween = TweenService:Create(TweenValue, TweenInfoToUse, {Value = script.Parent.Parent.PrimaryPart.CFrame + Vector3.new(0, 3, 0)})
OnTween:Play()	
			
repeat
	wait()
until OnTween.Completed:Wait()
			
TweenValue:Destroy()

Tweening uses CFraming, but since you are using it on a vehicle I believe there will be issues since the vehicle probably isn’t Anchored.

Yes your right the parts are not anchored. I already tried welding the parts of the model and the tweening it that didn’t work. It also didn’t lift the vehicle or anything. So the complete vehicle ain’t welded i guess? But the weird thing is that the Tween.Completed function gets called.

I don’t think it’s weird that the completed event was called. TweenService was likely setting the values as it should.

The issue comes from physical or scripted constraints overwriting the values. If it’s a weld, you can simply tween a property of the weld (e.g. C0 or C1 to move one part relative to another). If it’s scripted then you’ll need to edit the way the chassis script works or put the model you want to move separately outside of the chassis model.

How would a go on change the C0 or C1 value?

TweenService:Create( theWeld, tweenInfo, { C1 = goalC1 } )

You can read the documentation of the Create method here to learn more about creating Tweens: TweenService | Documentation - Roblox Creator Hub

Thank you! It works now. This took me way to long to figure out!