Is it possible to use tweenService to move a set of parts. I placed a tweenService Script in a part, with other parts welded to it. However, only the part with the script moved, leaving all the parts welded to it behind. How do I fix this
i think you’ve tweened the position try to use the CFrame and im sure it would work
How Do I tween cframe? Is it cframe.new(x,y,z)
yeah
like {CFrame = CFrame.new(0,1,2)}
This tutorial might help you out
Step 1: Take all the parts (including welded ones) and make a model.
Step 2: Set the primarypart of the model to the part which is connected to all the welds.
Step 3: Get the primary part using Model.PrimaryPart
and tween it.
If this doesn’t work, please send your script as this would clear up my doubts.
local TweenService = game:GetService("TweenService")
local engine = script.Parent
local TweenMovingInfo = TweenInfo.new(
100, --Seconds
Enum.EasingStyle.Linear, --Easing style
Enum.EasingDirection.Out,
0, --Repeat
false, --Reversed
0
)
local Target =
{
CFrame = CFrame.new(-8440.991, 3.573, 138.669);
}
local startTween = TweenService:Create(engine,TweenMovingInfo, Target)
startTween:Play()
this is my code, is there anything wrong? The cframe dosent work
tried this, dosent work. tho however
If you have placed the part with all the welds inside a model, make that part the PrimaryPart
of the model. Then, replace local engine = script.Parent
with local engine = script.Parent.Parent.PrimaryPart
.