I am making a GMOD Gamemode and I was my prop to go more invisible as its health goes down. I have the code working, but when the alpha changes, the prop stays completely opaque.
[CODE]function ENT:OnTakeDamage(dmg)
if(Health <= 0) then return end
Health = Health - dmg:GetDamage()
if(Health <= 0) then
self:Remove()
end
local Trans = Health/MaxHealth*255
self:SetColor(Color(196, 196, 196, Trans))
print(dmg:GetDamage(),Health,Trans)
PrintTable(self:GetColor())
end[/CODE]
The important part is the "self:SetColor(Color(196, 196, 196, Trans))"
Thank you, Endus322