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

How can I detect if there's text and textbox is focused so I can tween a textlabel?

ts = game:GetService('TweenService')

if script.Parent.Text ~= "" then
	ts:Create(script.Parent.Parent.UserText, TweenInfo.new(0.05), {TextSize = 12}, true):Play()
	ts:Create(script.Parent.Parent.UserText, TweenInfo.new(0.05), {TextColor3 = Color3.fromRGB(33, 197, 229)}, true):Play()
	script.Parent.Parent.UserText:TweenPosition(UDim2.new(0.185, 0,-0.08, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.2, true)
elseif script.Parent.Text == '' and script.Parent.Parent.Username.FocusLost then
	ts:Create(script.Parent.Parent.UserText, TweenInfo.new(0.05), {TextSize = 14}, true):Play()
		script.Parent.Parent.UserText:TweenPosition(UDim2.new(0.145, 0,0.5, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.2, true)
end

I made this but it's not working and didn't print any errors

1 answer

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