There are no errors, the cart does not move
All the parts in the cart are welded to the primary part
No parts are anchored
If I remove the railroad or move the cart higher, no difference is made
Here is the script:
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(120,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
local primary = script.Parent.PrimaryPart
local goal1 = {
CFrame = primary.CFrame * CFrame.new(-629.5, -0.5, -1816.5)
}
local goal2 = {
CFrame = primary.CFrame * CFrame.new(2856.5, -0.5, -1816.5)
}
local tween1 = ts:Create(primary,ti,goal1)
local tween2 = ts:Create(primary,ti,goal2)
while true do
tween1:Play()
tween1.Completed:Wait()
tween2:Play()
tween2.Completed:Wait()
end
There are no errors
I have put prints in between where the loop starts, where the tween is played and completed, and they both print properly, but nothing actually happens
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(120,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
local primary = script.Parent.PrimaryPart
local goal1 = {
CFrame = CFrame.new(-629.5, -0.5, -1816.5)
}
local goal2 = {
CFrame = CFrame.new(2856.5, -0.5, -1816.5)
}
local tween1 = ts:Create(primary,ti,goal1)
local tween2 = ts:Create(primary,ti,goal2)
while true do
tween1:Play()
tween1.Completed:Wait()
tween2:Play()
tween2.Completed:Wait()
end
You can’t tween only the PrimaryPart of a model, and have it all move. You can either tween each piece individually, or you can tween the PrimaryPart, and have all parts unanchored and welded to it.
It is, but everything else isn’t moving with it, when I take everything away it moves fine but when I add everything to the primary part again it does nothing
Dang, I completely missed that. Can you see if the PrimaryPart is moving? CFrame = primary.CFrame * CFrame.new(-629.5, -0.5, -1816.5)
Can you just set the goal CFrame to the End? CFrame.new(Vector3.New(5,5,5))
It should work. Use this Weld Plugin and select the primary part and then all parts you want to weld, then click the Instant Weld button. Leave the primary part anchored but other parts unanchored
Select the primary part, then select everything else and click the Instant Weld button. Then, you want to make sure the primary part is anchored and everything else isn’t. It should work afterwards.