This script is supposed to continuously update a player's Ratio value based on their kills and deaths.

However, the script doesn't work, and output gave me nothing.

Can someone please help me?

Here's the script:

local Player = game.Players.LocalPlayer
local stats = Player:WaitForChild("leaderstats")

while wait(0.1) do
	if Player ~= nil then
		if stats ~= nil then
			stats.Ratio.Value = (stats.Kills.Value/math.max(1,stats.Deaths.Value))
		end
	end
end

2 comments

0

Hieee!! I'M REXBIT'S LIL BRUDDA... GET ME SUSPENDED PLZZZ

1

put a print on line 3, and if it doesn't print, then the :WaitForChild() is waiting forever