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

TweenService:Create() doesn't work as intended?

Heres the code :

local dropdown = script.Parent.Parent.Dropdown
local tweeninfo = TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
local tweenservice = game:GetService("TweenService")
script.Parent.Activated:Connect(function()
	if dropdown.Visible == false then
		dropdown.Visible = true
		local tween = tweenservice:Create(dropdown,tweeninfo,{Size = UDim2.new(0.418,00.337, 0)})
		tween:Play()
	else
		local tween2 = tweenservice:Create(dropdown,tweeninfo,{Size = UDim2.new(0.418, 0,0, 0)})
		tween2:Play()
		tween2.Completed:Connect(function() dropdown.Visible = false end)
	end
end)

Whenever I close and re-open the frame it doesn't scale itself properly.

1 comment

0

Looks like you made a typo

1 answer

✓ Accepted answer

In the first tween, you only have 3 numbers.(0.418,00.337, 0) Looks like you wanted (0.418,0, 0.337, 0)

2 comments

0

Ill try this

0

Apparently both we're wrong so I fixed both.

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