What I want is that a color3 value to get darker based on an intvalue.
--For example:
--The intvalue slowly goes down to 0 with a loop. It starts at 10.
--If the intvalue is at 5, the color3 would be 50% darker.
--If it's at 10, the color3 value will be its base color.
None of my attempts have worked, I would be grateful if someone could help me
In the case where you want to only change the brightness, you might want to use Color3:ToHSV and Color3.fromHSV to do this. It will retain hue and saturation while only changing value/brightness.
local intValue = workspace.IntValue
local color3Value = workspace.Color3Value
local hue, saturation = color3Value.Value:ToHSV()
intValue:GetPropertyChangedSignal:Connect(function()
local newValue = intValue.Value / 10 -- in this case, "value" refers to the value (brightness) of the colour
color3Value.Value = Color3.fromHSV(hue, saturation, newValue)
end)