-
What do you want to achieve? Am attempting to make a train system using tweenservice.
-
What is the issue? The code throws an error “Unable to cast to dictionary”
-
What solutions have you tried so far? Searched DevHub and scriptinghelpers.
local TweenService = game:GetService('TweenService')
local istrue = false
repeat
for i, v in pairs(workspace.TrainParts.RailParts.Stops:GetChildren()) do
if v:IsA("Part") then
local part = game.workspace.TrainParts.Train.TrainPart
local goal = {v.CFrame}
local info = TweenInfo.new(
20,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out,
0,
false,
0
)
local Tween = TweenService:Create(part, info, goal)
Tween:Play()
else print("Failure is not an option")
end
end
until istrue == true
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.