BoatTween module

Found an issue: can not have multiple Tweens created on a single Instance at a time

Use case: in a case where one might want to save multiple Tweens instead of creating new ones every time upon usage

Code
local part = script.Part; part.Parent = workspace
local TweenS = require(script.BoatTween)

local tween1 = TweenS:Create(part,{
    Goal = {
        Position = Vector3.new(0,10,0)
    }
})

local tween2 = TweenS:Create(part,{
    Goal = {
        Position = Vector3.new(0,0,0)
    }
})

local DB;

part.ClickDetector.MouseClick:Connect(function()
    if not DB then
        DB = true
        tween1:Play()
        wait(2)
        tween2:Play()
        wait(1)
        DB = false
    end
end)

repro.rbxl (33.7 KB)

2 Likes