Script cannot find an existing folder

I made a script that detects a value changing inside leaderstats, but when i run the game, it cannot find the folder and says infinite yield possible (Details: I’m modifying an old game, the script is a server script)

game.Players.PlayerAdded:Connect(function(player)
	local ls = player:WaitForChild("leaderstats")
	ls.KOs:GetPropertyChangedSignal("Value"):Connect(function()
		game.ReplicatedStorage.Claim_Server:Fire(player)
	end)
end)

pls help

editor note: I fixed it but i still wanna know why it happened

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.