What do you want to achieve? Keep it simple and clear!
Hi, so I’m trying to make a textlabel to open and tween after I click on the textbutton.
What is the issue? Include screenshots / videos if possible!
the problem with my script is that it doesn’t open and tween and I got this error in the output.
TweenInfo.new first argument expects a number for time.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried researching on google and the developer forum for solutions but couldn’t seems to find a way through to fix my script.
local TweenService = game:GetService("TweenService")
local PlayerService = game:GetService('Players')
local Player = PlayerService.LocalPlayer
local PlayerGui = Player:WaitForChild('PlayerGui')
local ScreenGui = PlayerGui:WaitForChild('ScreenGui')
local TextLabel = game.StarterGui.ScreenGui.TextButton.TextLabel
local TextButton = script.Parent.TextButton
ScreenGui.TextButton.MouseButton1Click:Connect(function()
TextLabel.BackgroundTransparency = 0
TextLabel.TextTransparency = 0
local info = TweenInfo.new{
15,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
}
local InfoPlay = TweenService:Create(TextLabel, info)
InfoPlay:Play()
end)
I’d be appreciative if someone could help me with my script.