Is there a way I can make an invisible gui frame cover plain white text?

I want to have an effect where I tween a UI frame to uncover text like so;

keep in mind I want the frame to be transparent and still hide or cover up the text is this possible?

2 Likes

You could probably place the text in the frame like so
image

Then enable clip descendants on that frame
image

Then you can tween and mess with the text in the frame like this

Another option would be using UIGradient
c1202a8784bfd4a4ac7d8570a7c382121
The script move those 2 points.
9b3b255ac68963cc7afb46e4c632b2ba1

local UIGradient = script.Parent
local RunService = game:GetService("RunService")
function setGradTrans(grad,v)
	local mar = .01
	if v<mar then
		grad.Transparency = NumberSequence.new(1)
	elseif v>1-mar then
		grad.Transparency = NumberSequence.new(0)
	else
		grad.Transparency = NumberSequence.new({
			NumberSequenceKeypoint.new(0,0),
			NumberSequenceKeypoint.new(v,0),
			NumberSequenceKeypoint.new(v+mar,1),
			NumberSequenceKeypoint.new(1,1),
		})
	end
end
function fadeIn()
	local t = tick()
	local duration = 3
	while tick()-t<duration do
		local alpha = (tick()-t)/duration
		setGradTrans(UIGradient,alpha)
		RunService.RenderStepped:Wait()
	end
end
function fadeOut()
	local t = tick()
	local duration = 3
	while tick()-t<duration do
		local alpha = (tick()-t)/duration
		setGradTrans(UIGradient,1-alpha)
		RunService.RenderStepped:Wait()
	end
end
while true do
	fadeIn()
	fadeOut()
end
5 Likes

Woah this is very cool I am looking into this I thought gradients had to be manually in photoshop. Okay nevermind I looked it up a bit and I didnt even know they had a UIgradient thing.