Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What do I put for TweenService 2nd Argument?

script.Parent.MouseLeave:Connect(function()
	TweenService:Create(script.Parent, argument, {ImageColor3 = Color3.fromRGB(138, 138, 138)})
end)

I need help, I don't know what to put for the 2nd argument on this script, as I've forgotten a bit of lua. I'd appreciate it if someone helped me.

2 comments

0

Thank you.

1 answer

✓ Accepted answer

You need TweenInfo. Having TweenInfo.new() means you would be using the defaults. More info on TweenInfo here.

Here's an example:

local tweenService = game:GetService("TweenService");
local tweenInfo = TweenInfo.new(
1, -- Time
Enum.EasingStyle.Quad, -- the easing style
Enum.EasingDirection.InOut, -- easing direction
0, -- repeat count
false, -- reverses or not
0 -- delay amount before starting
);
local goal = {
Size = Vector3.new(10, 10, 10);
}
local tween = tweenService:Create(workspace.Part, tweenInfo, goal);
tween:Play();

If you would like to see how EasingStyles look, I suggest TweenSequence Editor plugin, which can be found here.

This discussion is preserved as it was. New answers, comments, and votes are closed.