I’m trying to have my Ui object tween nicely into view using size, but the code I’ve put together does not work.
I’m confused because I’ve checked on multiple sources to see if I coded this wrong but couldn’t find anything.
It’s also late so I might be missing something really obvious :I
Heres the code
game.ReplicatedStorage.Events.ShowRoles.OnClientEvent:Connect(function(role, text, color)
ImageLabel.Size = UDim2.new({0, 0},{0, 0})
Role.TextColor3 = color
Role.Visible = true
ImageLabel.Visible = true
Info.Visible = true
Info.Text = text
Role.Text = role
wait(3)
print("TweeningSize")
ImageLabel:TweenSize(
UDim2.new({0.352, 0},{0.814, 0}), -- endSize (required)
Enum.EasingDirection.Out, -- easingDirection (default Out)
Enum.EasingStyle.Quad, -- easingStyle (default Quad)
0.5, -- time (default: 1)
true -- should this tween override ones in-progress? (default: false)
)
ImageLabel.Size = UDim2.new({0.352, 0},{0.814, 0})
wait(7)
ImageLabel.Visible = false
Role.Visible = false
Info.Visible = false
end)