How to add a Kill Death Ratio to a DataStore?
Asked by
6 years ago Edited 6 years ago
I'm a bit confused on how exactly I would do this. I have the rest of my DataStore fully functioning, but this is the only part I'm not so sure about.
1 | local KDR = Instance.new( "NumberValue" , StatNumbers) |
3 | if Kills.Value = = 0 and Deaths.Value = = 0 then |
5 | elseif Kills.Value > = 0 and Deaths.Value > 0 then |
6 | KDR.Value = Kills.Value/Deaths.Value |
7 | elseif Kills.Value > 0 and Deaths.Value = = 0 then |
8 | KDR.Value = Kills.Value |
When I go to view my stats and the output, I get this number: -2147483648
I have my Kills set to 28 whilst my deaths are set to 3, so I was expecting a number around 9.3. What should I change to fix this?