I guess one of the errors was that you mentioned TweenService 3 times in this script only write this once on the top of the script:
local TweenService = game:GetService("TweenService") -- only write this once in your script!
I am not sure if it works now but I improved it. Probably the error was that you used the same names like Info and Goals 4 times in all tweens.
Also its better to use task.wait() instead of wait() in your scripts because task.wait() is the improved version and its better.
heres the full script:
local TweenService = game:GetService("TweenService")
local lol = "e"
local g1 = game.Workspace.OutfitCon.Group1.Part
local g2 = game.Workspace.OutfitCon.Group2.Part
local Debounce = false
--send g1 to mid
local Info = TweenInfo.new(
2, -- Length
Enum.EasingStyle.Linear, -- Easing Style
Enum.EasingDirection.Out, -- Easing Direction
0, -- Times repeated
false, -- Delay
0
)
local Goals =
{
Position = Vector3.new(0,0,20);
}
local tween = TweenService:Create(g1,Info,Goals)
-- send g1 to end
local Info2 = TweenInfo.new(
2, -- Length
Enum.EasingStyle.Linear, -- Easing Style
Enum.EasingDirection.Out, -- Easing Direction
0, -- Times repeated
false, -- Delay
0
)
local Goals2 =
{
Position = g1.Position + Vector3.new(0,0,20);
}
local tween2 = TweenService:Create(g1,Info2,Goals2)
--send g2 to mid
local Info3 = TweenInfo.new(
2, -- Length
Enum.EasingStyle.Linear, -- Easing Style
Enum.EasingDirection.Out, -- Easing Direction
0, -- Times repeated
false, -- Delay
0
)
local Goals3 =
{
Position = g2.Position + Vector3.new(0,0,20);
}
local tween3 = TweenService:Create(g2,Info3,Goals3)
-- send g2 to end
local Info4 = TweenInfo.new(
2, -- Length
Enum.EasingStyle.Linear, -- Easing Style
Enum.EasingDirection.Out, -- Easing Direction
0, -- Times repeated
false, -- Delay
0
)
local Goals4 =
{
Position = Vector3.new(0,0,20);
}
local tween4 = TweenService:Create(g2,Info4,Goals4)
while true do
if lol == "e" and Debounce == false then
Debounce = true
g1.Position = game.Workspace.OutfitCon.StartPart.Position
task.wait()
tween() --- ERROR
task.wait(10)
tween2()
task.wait(1)
lol = "f"
Debounce = false
else
if lol == "f" and Debounce == false then
Debounce = true
g2.Position = game.Workspace.OutfitCon.StartPart.Position
task.wait()
tween3()
task.wait(10)
tween4()
task.wait(1)
lol = "e"
Debounce = false
end
end
end