Color brightness modifier code does not work

image
(line 21 is local auxOff = colorsub(aux.Color, alpha))

Developer hub solutions are either ones using rgb (inaccurate), unrelated (“similar” to my problem) or ones I have already tried.

local alarms = script.Parent
local alarmValues = game:GetService('ServerStorage'):WaitForChild('Alarms')
local ts = game:GetService('TweenService')
local tiin = TweenInfo.new(0.4, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
local tiout = TweenInfo.new(0.4, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)

function colorsub(color:Color3, alpha:number)
    return color:Lerp(Color3.new(0,0,0), alpha)
end
task.wait(2)
local aux = alarms.Auxilliary
local warning = alarms.Warning
local master = alarms.Master
local mute = alarms.Mute
local sec = alarms.Security

local alpha = 0.3

local auxOff = colorsub(aux.Color, alpha)

forgot to add the broken part of the code!

local auxOff = colorsub(aux.Color, alpha)
local warOff = colorsub(war.Color, alpha)
local masOff = colorsub(mas.Color, alpha)
local mutOff = colorsub(mute.Color, alpha)
local secOff = colorsub(sec.Color, alpha)

Additionally, all the ancestry is correct and studio displays Color for the variables.

image

Fixed; variable names were not aligned!

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