Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script Isn't functioning correctly?

Asked by 4 years ago

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)
0
there are no errors aswell localMeems 0 — 4y
0
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? Ziffixture 6913 — 4y
0
it's a local script located in a textLabel, which is inside of a rame, screen gui, and startgui localMeems 0 — 4y

Answer this question