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

I found the root cause of the issue that I have reported:

You are storing the Value not the Instance it self, so while the Part.Position changes the Value stays the same.

It’s like doing

Value = NumberValue.Value

Instead of

Value = NumberValue


If you aren’t going to maintain this Module I can step up, @boatbomber if you would allow that

1 Like

I’ll make a GitHub repo for this over the weekend if you’d like to fork and make contributions!

Edit: Done. @RuizuKun_Dev

2 Likes

A little more than that actually. To be more specific, it’s a CIELUV lerp, which is much more accurate and better than the RGB lerp that Color3::Lerp uses.


9 Likes

Thanks for letting me know! I will do some research regarding this soon.

How can I see the default values of the data dictionary?

i used

Tween.Completed:Connect(Tween.Destroy)

but my ui just freeze after it?

I’ll give this a run, looking forward to trying it out!

What exactly are you trying to do here? Why are you trying to destroy the object that you are tweeting after completing it? Plus, since :Destroy passes self as the first parameter (hence the “:”), you would need to pass that as the first parameter. So if you wanted to destroy the instance you are tweening (assuming it is an instance) after it is done, here is what it would look like:

Tween.Completed:Connect(function()
    Tween:Destroy()
    — or Instance:Destroy() if you have the instance readily available.
end)

im just trying to automaticly destroy the tween object

Then that isn’t neccisary. Just delete the line of code, it stops itself when it is completed.

Tween.Completed:Connect(Tween.Destroy) -- tween.Destroy is a function and completed event will call it

There’s no need to go in all caps (i.e. yelling) at someone over code. We’re all hear to learn.

@p49p0 is correct about trying to destroy the Tween after use. From what I understand, they aren’t trying to stop the Tween after completion, they are trying to destroy it. So there’s a disconnect between what you both are talking about. Try and address that, clarify whatever isn’t being understood, and ensure they get what’s going on (if you’re confident that you have the better method) versus yelling.

1 Like

Please stop picking fights. We can all see that WarriorAnt was replying to deleted posts of yours (if you click the arrow image nothing will pop up because they are deleted posts)

Moreover, you’re sidetracking the thread. This is supposed to be a thread about the BoatTween module, and at this point you’re deviating it by picking fights.

Please stop.

2 Likes

The argument is done, you are sidetracking the thread more by resonding. Drop it already. We aren’t two here.

This may be a bug or it may be a error on my end, but I have noticed when you try to tween a frame using negative coordinates on the Y axis instead of tweening it, it’s position is just set to the requested position not tweened.

Edit:
The tween works when you request it to come down but not back up.

Here is the code I used

	hubClose = BoatTween:Create(homeDisplay, {

		Time = 2;
		EasingStyle = "ExitExpressive";
		EasingDirection = "Out";

		Reverses = false;
		DelayTime = 0;
		RepeatCount = 0;

		StepType = "Heartbeat";

		Goal = {
			Position = UDim2.new(0.5, 0, -0.5, 0)
		} 
	}),

Found a bug when trying to use BoatTween to make UI changes.

Basically BoatTween gets weird when trying to tween the TextTransparency of a TextLabel (to create a fading effect). Not sure if this occurs with other instances, but this definitely seems like unintended behavior.

Here’s a test place to run the code (one version with BoatTween and the other with regular TweenService) which should illustrate the issue!

Boat Tween Bug.rbxl (46.7 KB)

EDIT: This bug seems to occur when Tween.Completed:Wait() is called and the same instance is immediately tweened after.

1 Like

It has been a long while since this project was created, sorry for reviving. I understand this project isn’t being maintained actively, but is this module still better to use in place of TweenService? Also, do you know where I could find graphs or some other visual representation of how your additional easing styles look?

1 Like

Can we get an image of how they look?

Also how did you managed to require() 2 other modules inside the main one?