I have a script that returns a special string whenever an Integer is negative, but it does not change and instead returns the negative number.
Code :
Label = script.Parent
Kin = game.Players.LocalPlayer.Statistics.Values.Kin
while wait(.25) do
if Kin.Value < 1000 then
Label.Text = Kin.Value
elseif Kin.Value < 1000000 and Kin.Value > 999 then
length = string.len(tostring(Kin.Value))
Label.Text = string.sub(tostring(Kin.Value), 1, length - 3) .. "," .. string.sub(tostring(Kin.Value), length - 2)
elseif Kin.Value < 10000000 and Kin.Value > 999999 then
length = string.len(tostring(Kin.Value))
Label.Text = string.sub(tostring(Kin.Value), 1, length - 6) .. "," .. string.sub(tostring(Kin.Value), length - 5, length - 3) .. "," .. string.sub(tostring(Kin.Value), length - 2)
elseif Kin.Value > 9999999 then
Label.Text = "E-KL-OF"
elseif Kin.Value < 0 then
Label.Text = "E-KL-UF"
end
end
The part I am talking about is at Line 17 and 18. Every variable is correctly defined. Whenever I change the value of Kin to a negative number (e.g. -15), the Label's Text displays the same number (-15 in this case) instead of the message "E-KL-UF". Any help?
The output gives no errors.

1 comment
Thank you, did not see I missed that.