function Change(power,hit)
local potion = script.Parent.Potion
local pos = script.Parent.Potion.Position
potion.AnchorPoint = Vector2.new(pos.X,pos.Y)
if targetSet == false and Parts[hit.Name.."X2"] ~= nil then
print("Two-step")
local targetPosition = UDim2.new(pos.X.Scale,pos.X.Offset+Parts[hit.Name.."X"],pos.Y.Scale,pos.Y.Offset+Parts[hit.Name.."Y"])
local targetPosition2 = UDim2.new(pos.X.Scale,pos.X.Offset+Parts[hit.Name.."X"]+Parts[hit.Name.."X2"],pos.Y.Scale,pos.Y.Offset+Parts[hit.Name.."Y"]+Parts[hit.Name.."Y2"])
targetSet = true
local tweenInfo = TweenInfo.new(1.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
tween = TweenService:Create(potion, tweenInfo, {Position = targetPosition})
print("Tween initialized:", tween)
tween2 = TweenService:Create(potion, tweenInfo, {Position = targetPosition2})
print("Tween2 initialized:", tween2)
elseif targetSet == false then
print("One-step")
local targetPosition = UDim2.new(pos.X.Scale,pos.X.Offset+Parts[hit.Name.."X"],pos.Y.Scale,pos.Y.Offset+Parts[hit.Name.."Y"])
targetSet = true
local tweenInfo = TweenInfo.new(2.5,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
tween = TweenService:Create(potion, tweenInfo, {Position = targetPosition})
end
end
im only trying understand tween so maybe here is dumb question, print("Tween initialized:", tween) is printing but tween2 is always nil and not printing at other stroke



