game:GetService("Players").PlayerAdded:Connect(function(player) --<this line doesnt work
print("got past player added function") --doesnt print
while true do
wait()
if player:WaitForChild("leaderstats").Deaths.Value == 0 then --can't divide by 0
script.Parent.Text = player:WaitForChild("leaderstats").Kills.Value
elseif player:WaitForChild("leaderstats").Deaths.Value >= 1 then
end
end
while true do
local kdr = player:WaitForChild("leaderstats").Kills.Value/player:WaitForChild("leaderstats").Deaths.Value
wait()
if string.len(kdr) >= 5 then
script.Parent.Text =string.sub(kdr,1,5)
elseif string.len(kdr) <= 4 and string.len(kdr) ~= 1 then
script.Parent.Text = "Ratio"..kdr
elseif string.len(kdr) == 1 and player:WaitForChild("leaderstats").Deaths.Value ~= 0 then
script.Parent.Text = "Ratio"..kdr
end
end
end)
COMMUNITY QUESTION
Script Isn't functioning correctly?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
there are no errors aswell
There are several issues with it, redundancies etc... Though you've likely used the wrong Script for the correlating environment; what type of Script are you using, and where is it located?
it's a local script located in a textLabel, which is inside of a rame, screen gui, and startgui