Unable to assign property Transparency. NumberSequence expected, got number

Greetings,

I am getting this error and I don’t know how to fix my code for it. The object that has the transparency that I am trying to modify is a UIGradient Please help me, thanks!

The error:

The code:

local function checkRebirths()
	if player:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value >= 2 then
		local copyYes = Yes:Clone()
		copyYes.Parent = button
		copyYes.Transparency = 0
	else
		local copyNo = No:Clone()
		copyNo.Parent = button
		copyNo.Transparency = 0
	end
end
2 Likes
local function checkRebirths()
	if player:WaitForChild("leaderstats"):FindFirstChild("Rebirths").Value >= 2 then
		local copyYes = Yes:Clone()
		copyYes.Parent = button
		copyYes.Transparency = NumberSequence.new(0)
	else
		local copyNo = No:Clone()
		copyNo.Parent = button
		copyNo.Transparency = NumberSequence.new(0)
	end
end
8 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.