Hi, I have this heart system that lets you know how many hearts you have. Everybody starts with 3, then the number can change if you get hit. And it works, until the last time. The first 3 times the hearts actually change color, from red to black. But when the countdown nears the end, I wanted to make it so that no matter how many hearts the player had left, there would be an image of a red skull, until the player was killed, at which point it would revert to black. And the skull image appears instead of the second heart, but it turns black instead of red and I can’t understand why
value:GetPropertyChangedSignal("Value"):Connect(function()
if value.Value == 3 then
frame.heart3.ImageColor3 = Color3.fromRGB(191, 38, 2)
frame.heart2.ImageColor3 = Color3.fromRGB(191, 38, 2)
frame.heart1.ImageColor3 = Color3.fromRGB(191, 38, 2)
elseif value.Value == 2 then
frame.heart3.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart2.ImageColor3 = Color3.fromRGB(191, 38, 2)
frame.heart1.ImageColor3 = Color3.fromRGB(191, 38, 2)
elseif value.Value == 1 then
frame.heart3.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart2.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart1.ImageColor3 = Color3.fromRGB(191, 38, 2)
elseif value.Value == 0 then
frame.heart3.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart2.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart1.ImageColor3 = Color3.fromRGB(0, 0, 0)
elseif value.Value == "end" then
frame.heart3.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart2.ImageColor3 = Color3.fromRGB(191, 38, 2)
frame.heart1.ImageColor3 = Color3.fromRGB(0, 0, 0)
frame.heart2.Image = "http://www.roblox.com/asset/?id=1202170403"
end
end)
Any help is appreciated!