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

string expected, got nil How to fix?

Asked by 2 years ago

my code is wait(1) local u1 = { "", "K", "M", "B", "T", "Qd", "Qn", "sx", "Sp", "O", "N", "D", "Ud", "DD", "tdD", "qdD", "QnD", "sxD", "SpD", "OcD", "NvD", "Vgn", "UVg", "DVg", "TVg", "qtV", "QnV", "SeV", "SPG", "OVG", "NVG", "TGN", "UTG", "DTG", "tsTG", "qtTG", "QnTG", "ssTG", "SpTG", "OcTG", "NoAG", "UnAG", "DuAG", "TeAG", "QdAG", "QnAG", "SxAG", "SpAG", "OcAG", "NvAG", "CT" } local function v1(p1) for v2 = 1, #u1 do if tonumber(p1) < 10 ^ (v2 * 3 / 100) then return math.floor(p1 / (10 ^ ((v2 - 1) * 3) / 100)) / 100 .. u1[v2] end end end local l__LocalPlayer__3 = game.Players.LocalPlayer; while wait(0.01) do script.Parent.Text = v1(l__LocalPlayer__3:WaitForChild("leaderstats").Coins.Value) end

and the error is 05:11:54.395 Players.WeecheekyC0n.PlayerGui.Main.TextLabel.LocalScript:12: invalid argument #3 (string expected, got nil) - Client - LocalScript:12

0
when i put it in a normal script it says 06:03:15.554 Players.WeecheekyC0n.PlayerGui.Main.TextLabel.Script:12: attempt to index nil with 'WaitForChild' - Server - Script:12 weecheekyc0n 0 — 2y
0
when i put it in a normal script it says 06:03:15.554 Players.WeecheekyC0n.PlayerGui.Main.TextLabel.Script:12: attempt to index nil with 'WaitForChild' - Server - Script:12 weecheekyc0n 0 — 2y
0
Please put this in a code block my guy. Krektonix_Youtube 85 — 2y

Answer this question